Skip to Content
Innovative Tableau
book

Innovative Tableau

by Ryan Sleeper
May 2020
Beginner to intermediate
634 pages
15h 49m
English
O'Reilly Media, Inc.
Content preview from Innovative Tableau

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 within ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

The Tableau Workshop

The Tableau Workshop

Sumit Gupta, Sylvester Pinto, Shweta Savale, JC Gillet, Kenneth Michael Cherven
INSPIRED

INSPIRED

Marty Cagan

Publisher Resources

ISBN: 9781492075646Errata Page