Chapter 66. 3 More Innovative Ways to Use Dates: Tip 1
How to Compare the Last Two Full Days, Weeks, Months
This chapter aims to help you harness dates in Tableau to create powerful comparisons in your dashboards. You will learn how to isolate the last two full reporting periodsâwhether they be days, weeks, months, quarters, or yearsâso that you can compare the last complete date part to the date part preceding it (e.g., last week compared to the week before). You can use the calculations shared in this chapter as a foundation to create period-over-period percent or index changes, filter your dashboards to only the most recent dates, and normalize the dates so they overlap on the same axis.
Even though there is almost always more than one way to do the same thing in Tableau, Iâve attempted to provide an easy-to-execute solution that also processes efficiently. As such, this approach allows you to compare the last two complete date parts without the use of level of detail calculations or table calculations. I owe a big thank you to Playfair Data partner consultant, Rody Zakovich; he collaborated with me on this chapter to make the calculations even more elegant than my original idea.
How to Isolate the Last Two Complete Date Periods
This technique works regardless of what date part you are using (day, week, month, quarter, or year), assuming that your data source is updated at least daily. The foundational calculated field that you need computes whether the date range is ...
Get Innovative Tableau now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.