Excel style text tables remain a mainstay for quantitative data representation because of tradition, habit, high density of information per area, high information to ink ratio. They are here stay. Graphical data visualization won't replace them. The best hope is the coexistence of both.
You may have seen following text tables with visual background in Tableau Server web pages or Tableau Data Prep desktop.
Here we are going to show you how we can implement this using Tableau Desktop.
There are a few ways we can add visual background to text tables: 1) horizontal bar 2) symmetric bar 3) heat map. Plus no background, below are four ways of showing the same column of numbers.
Heat map is really useful in high density low space tables where quantitative differential perception is not as important. Bars can be more useful in medium density tables with adequate spaces to show the size of the measures. We are going to present the two cases of bars: horizontal and symmetrical bars. Some of the techniques are based on the conditional formatting in Tableau. Please take a look at this viz by Jonathan Drummey.
1.Horizontal bars as background
- For each measure, we will use two columns Sum(0) and Sum(0). One column Sum(0) will use Gantt chart for creating bars. The other Sum(0) will serve for the Text Label (center-aligned). Then dual axis them to merge the two together and have the column headers on top.
Adjust the opacity of the bars to be visible yet not too bright. We want the text to be more visible than the background.
- We will use Sum(Measure) as Size. In case of Profit and Profit Ratio, where there are both positive and negative numbers, we will use ABS(Sum(Measure)) or ABS(Profit Ratio) for Size, Sign(Sum(Measure)) or Sign(Profit Ratio) for Color, where Profit Ratio is an aggregated measure already.
- The header is not your regular one. It results from editing the axis. Edit the title of the axis and hide the tick marks.
2.Symmetric bars as background
- We will use two columns Sum(0) and Sum(-Measure/2) or -ABS(Sum(Measure/2) ) for each column of a Measure. Sum(-Measure/2) will shift the bars halfway towards left. Note that there is no further aggregation in case of Profit Ratio which is an aggregated measure already.
- Again we will use Gantt chart for the bars. The Size is still using Sum(Measure) or ABS(Sum(Measure)) .
- Dual axis them. The formatting of headers is similar to the above horizontal bars.
Voila, we just showed how to add visual backgrounds to a text table. Some like the horizontal bars as background. Personally I like the symmetric bars more.
- Dual axis them. The formatting of headers is similar to the above horizontal bars.
Voila, we just showed how to add visual backgrounds to a text table. Some like the horizontal bars as background. Personally I like the symmetric bars more.
We can also apply the same technique mixing with other graphical representations, showing secondary measures such as follows.
More details can be found in the example workbook here.
Very useful Alex, thank you! I plan on implementing it immediately for one of my visualizations.
ReplyDelete