Last Modified Date: 31 Oct 2017
- Tableau Desktop
- Windows 7
AnswerSee the attached workbook as an example.
The first two sheets show two different ways to create the desired count of closes.
We can either simply count the boolean field (if contained in the data source):
These two options result in the exact same value. See Sheets "Day of Date/Time Closed (Simple)" and "Day of Date/Time Closed" for comparison. There are actually a few more ways to calculate this number, but either of the above two should suffice.
COUNT(if not ISNULL([Date/Time Closed])
THEN [Date/Time Closed]
We can then place
DAY(Date/Time Closed)and the
COUNT of closeson columns and rows respectively and add COUNT of closes to the Text Marks card. This will create a view showing how many cases were marked as closed truncated to
DAY. See Sheet "Day of Date/Time Closed".
Now, we can write a simple calculation, in this case called "difference from previous day", to calculate the difference in cases closed from the previous day:
The "difference from previous day" calculation can be dragged onto the Text Marks card.
LOOKUP([count of closed (simple)],0) - LOOKUP([count of closed (simple)],-1)
We then created a calculation called "Growth":
[difference from previous day] > 0 THEN 'More Than Previous Day'
[difference from previous day] = 0 then 'No Change'
[difference from previous day] < 0 then 'Less Than Previous Day'
The "Growth" calculation can now be dragged onto both the Color and Size Marks cards. Now we observe red lines indicating Cases closed are decrease from the previous day, and blue/purple lines indicating Cases closed are increasing compared to the previous day. See the "Solution" Sheet.
Additional InformationThe referenced fields are generally available when using SalesForce as a data source.
Thank you for providing your feedback on the effectiveness of the article.
Open new Case
Training and Tutorials