You pick which (one) damage roll it applies to, but the wording suggests it’d apply to the “elemental” cold damage
The Draconic Bloodline sorcerer’s Elemental Affinity feature says (post-errata):
Starting at 6th level, when you cast a spell that deals damage of the type associated with your draconic ancestry, you can add your Charisma modifier to one damage roll of that spell.
The feature doesn’t say how the damage roll it’s applied to is chosen, so it’s up to the caster. That said, the way Elemental Affinity is phrased suggests that it’s meant to provide a boost to the damage of that element type.
The ice knife spell deals only (1d10) piercing damage on initial hit. It’s only the subsequent explosion of ice that deals the (2d6) cold damage. As such, it seems likely that the feature is intended to boost that cold damage, given that the feature only activates because you’re dealing the cold damage. If applied to the cold damage, then, well, the damage bonus applies to that roll as a whole – so it’d increase the damage dealt to everyone within the area of effect that failed the Dex save.
If, however, you cast a spell that dealt the damage type associated with your dragon ancestor on multiple instances – such as a concentration spell like call lightning, assuming your dragon ancestor is blue/bronze (associated with lightning damage) – then you’d get to choose which single damage roll you’d add your Charisma mod to. You wouldn’t get the Charisma mod bonus every time you dealt damage with that casting of the spell; you’d get it just once per casting, but you could choose which damage roll to boost.