Complex data questions are hard to answer with simple visuals. When questions have multiple components, a single graph may not be enough. For instance, imagine you have a table of data displaying average daily high temperatures by month that looks like this:
You are then asked to answer the following question(s); how does the average daily high temperature vary seasonally and how do those values compare to the average daily high by month for all years in the data set?
Not an easy undertaking, right? When tasked with a multi-part question, it’s best to tackle each piece individually. Let’s start with the first question about seasonality.
I prefer to build a visual that is less text-based and more visually focused. The individual data is still available in the tooltip, but in this case we want the end users’ attention drawn toward the hottest and coldest months. A highlight table is a great fit:
The second question is more complicated. “How do those values compare...for all of the years?”. We need to build the visual so our end user can look at an individual month and quickly determine if that month is above or below the average for that month across every year. For a comparison like this, we’ll need a table calculation. Table calculations are powerful because they allow for local aggregations and comparisons. (If you want to learn more about Table Calculations check out this webinar).
We can use the WINDOW_AVG function to compare each cell against cells from the same month and display an up arrow (▲) if the value is above the average or down arrow (▼) if it isn’t.
From there, you can drop the calculation on text and the result looks like this. (Note: I made sure the scope and direction for this Table Calculation were Table (down).)
Feel free to get creative with symbols (like the arrows above) in your Tableau calculations. They open up a whole realm of possibilities. Check out this blog post to see another example of using symbols creatively in a Tableau calculation.