Hmm... That looks like a bug in the API. That dictionary error should never bubble up from that method. Anyway, could it be that the two selections are mutually exclusive? So that the value "prasanna" is already excluded when the month "April" is selected? Or perhaps the value "prasanna" does not exist?
Anyway, possible workaround could be to check that the field is part of the "FieldNames" list of the currentSelection object before doing the "GetSelectedData".
No, that list reflects the fields for which Qlik Sense considers there to be a selection.
But now that I look at it more closely, those loops of yours look rather strange. Is the "values" variable really a comma separated list? If so, why do you loop on "values.Count()"? That would be a loop based on the number of characters in the string.