All in Tableau How-Tos
Here's an interesting challenges; how do you compare this year's values to the average of the previous 3 years in Tableau? The complex solution requires the use of the FIXED level of detail function. Watch the above video to follow along and learn how to perform this calculation.
Imagine you have a busy worksheet in Tableau that looks like this:
Each line represents a single facility and displays that facility’s overtime hours. Imagine you want to filter to only keep the trends for the 3 facilities with the highest overtime hours from the most recent date BUT you also want that filter to be dynamic so when you update the data there might be a new top 3.
If you have a data set that updates irregularly, figuring out how to filter to show only the latest data is difficult. Relative Date Filters are great but only work well if you have a set time you are filtering to like “today” or “yesterday”. If your latest data could be today, yesterday, or two days ago depending on the refresh schedule, things get trickier.
If you've ever tried to compare part of your data to the whole in Tableau (and give your users flexibility to change the view), you might think it's not possible. However, with a combination of parameters and calculations, you can give users the ability to compare a partial selection to the whole, original value.
Remember the Attribute function? It returns a value if there is only a single value for a result set, otherwise it returns an asterisk.
As you likely know from using Table Calculations in Tableau, they only compute against the marks displayed in a worksheet. Check out this webinar in you need a refresher.
That means when a filter is applied to the worksheet, a table calculation will update to reflect only the data present in the worksheet.
I have worked with a number of educational institutions, What I’ve found about those institutions, and many other organizations, is that many of them customize the way they track data over time. With a school it might be by trimester, with a restaurant chain it might be by period (there are 13 per year). These types of date fields require customized calculations.
“How do you calculate a headcount at a moment in time when you only have a start and end date?” I’ve gotten this question several times. My answer used to be “Ideally, you’d want a row of data for an individual for every possible date unit you’d want to count them at.”
If you haven’t had a chance to check it out for yourself yet, I want to introduce you to Tableau’s latest breakthrough, the “viz in tooltip”. Let me show you how this works and why it’s valuable.
There will likely be times when you want to calculate performance year to date versus the same time period prior year to date.
Let’s imagine that we work for a restaurant chain and are helping perform an analysis to figure out which items are under-performing. We’ll start with a visual like this...
I want to teach you a method I’ve used with various clients when they needed a flexible date field as part of their Tableau dashboard. In one example, I was working with a company that was using Tableau to create client-facing reports. Problem is, they had different granularities of data for different clients. For some clients they collected data daily, others monthly, and some yearly. What they needed was the ability to create a flexible dropdown that allowed them to change the level of date granularity in the view.
If you’ve ever received the error “Cannot mix aggregate and non-aggregate comparisons or results in ‘IF’ expressions in Tableau I feel your pain. I spent my first several months in Tableau not understanding what that error meant and running into impassable roadblocks aggregating data in Tableau as a result.
Imagine you are living your best life and run a company that owns an ice cream parlor and a chocolate store. You have data for both companies that looks like this: