I have a problem that I am battling to figure out. Attached is the sample data with 2 additional fields preceded by the label 'desired'. These are the rules that need to be applied to correctly produce that value
Desired Output Rule
If the previous(PhoneNumber) is the same as the current PhoneNumber and not isnull(previous(FCRStatusValueFinal )) then sum all values in that group before the next null() value is encountered i.e. PhoneNumber 1234 has a value of 3 since all individual values meet the above condition and are summed.
Desired Key Rule
For each group, add a integer value to represent that.
Please, if anyone can assist with this it would be greatly appreciated. The reason for why I need it like this is because I want to then group by Key and Output and show how many 2, 3, 4, 5 callers there were. If you know of another way of getting this in script, by all means, please educate