Reputation: 113
I am working on building a Tableau dashboard and just recently learned about the new Level-of-Detail calculations released in Tableau v9. The raw data is structured as follows:
User Workflow Step Time Spent in Workflow Step
1 a 12
1 b 9
1 c 2
2 a 7
2 b 16
2 c 4
3 a 23
3 b 1
3 c 7
I am building a Tableau Text Table. For each user (User Dimension is placed in the Rows section) I want to display the workflow step with the maximum time spent by the user (User 1 = a, User 2 = b, etc). I am new to LoD calculations and can't figure out how to get this to work.
I have tried the following LoD calculation:
If [Time Spent in Workflow Step] = {Max([Time Spent in Workflow Step])} THEN 1 ELSE 0 END
When I pull in workflow step as a dimension, and use the calculation above as a filter (set equal to 1), I only get the single user with the longest time spent.
How do I make this calculation on a per-user level?
Upvotes: 2
Views: 655
Reputation: 7431
You are very close. You need to modify your calculation like so:
[Time Spent in Workflow Step] = { FIXED [User]: MAX([Time Spent in Workflow Step])}
You need to specify the actual level of detail, in this case it is [User]
.
Additionally, you do not need the IF
statement. The calculation above will return a Boolean result (True/False). Simply place that in the filter card and set to TRUE
.
Upvotes: 7