2 Replies Latest reply on Apr 3, 2016 8:48 AM by Manideep Bhattacharyya

# Calculation help

Each time a Case ID is sequenced to a unique assigned to group that case ID is considered to have been escalated. I want to be able to display a number that represents the number of escalated case IDs by each group. I am all out of ideas. Any advice/ideas? Thank you.

For example: This Case ID has been escalated 2 times.

• ###### 1. Re: Calculation help

If I'm understanding what you need correctly, then I'm thinking that a LOD expression might provide the solution you are looking for in this situation. For example, the following might work for you.

{fixed [Case ID] : countd([Assigned to Group]) } - 1

The "Fixed" part tells Tableau to do the calculation at the level of Case ID. The CountD will count then count the number of unique groups assigned for each Case ID, and finally -1 since the first assigned group doesn't count as an escalation.

Hope this helps

-Marc

• ###### 2. Re: Calculation help

Dear Stephen  - Your workbook contain SQL, that won't open in my desktop. Please try to simulate things in the Superstore dataset and post the problem. This will help you to get solution faster. However if I understood you correct then assigning any activity to "ALT CCI CB MYCOUNTY/MY ADMIN" means escalation.

Create a Calculated field "No. of Escalation"

{fixed [Case ID] : SUM(if Assigned to Group] = "ALT CCI CB MYCOUNTY/MY ADMIN"  THEN 1 ELSE 0 END)}

This will return 2 for the case HD0000023119947

Make that Field discrete and drag that field next to the Case will give you required result.

Thanks -

Manideep