could you share your workbook in a twbx format or at least some screen shots that show the way the data is shown on the screen -
In your if statement and in the case statement the function only processes until it hits the first True value - so if the first test is True (ie. event code = 2002 the function will return a 1 and stop -
I did note that in your second and third record the case number is the same - in processing those records the if function will return a 1 on the second record (3008) and a true on the third record (2002) so when you put the case id 125608 in the viz with a sum() aggregation it will total 2
If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution. Thank you.
3 of 4 people found this helpful
I think changing the calculated field to Attribute instead of Sum() aggregation will fix your issue.
Yes, as a case moves through the process it could, in fact, have multiple event codes that match. I don't care, in this instance if that is true though. I thought it would just drop out of the IF/THEN/ELSE statement after the first true was discovered but apparently not?
Also... I'm not sure how to upload my twbx....
When I changed it to ATTR it changed the value for the entire event code to 1 rather than counting each case separately.