In online Tableau literature, I noticed that most people referred to Zen Master Chris Love's formula in a 2014 post about the size of a trellis chart.

For the Column (X axis) and Row (Y axis), the formula are
  • X axis = (Index()-1)%Int(Sqrt(Size()))
  • Y axisInt((Index()-1)/Int(Sqrt(Size())))
Size() is related to the number of trellis cells. The formula are based on Sqrt(Size()) and will result in asymptomatically the same numbers of columns and rows, or a square-like trellis chart. This is not the only option though. 

We can have quite different numbers of columns and rows, thus various sizes of trellis chart. 

In theory, we can pick an arbitrary integer as the # of columns <= Size(). Then we use the following formula for X axis and Y axis:
  • X axis = (Index()-1)%[# of columns]
  • Y axis = Int((Index()-1)/[# of columns])
In the following example, we got a dimension Country Name having 36 countries. Assume we pick the # of columns to be 2, 3, 4, 5, 6. The corresponding # of rows will be 18, 12, 9, 8, 6. We thus got 5 options of trellis chart for the same data set.
You can download the demo workbook here and test various size options for a trellis chart. The trellis chart is inspired by Ashwin Shankar's design.
Feel free to leave comments below or contact me at twitter @aleksoft.
0

Add a comment

[Forward: I asked ChatGPT o1-mini who then wrote this. Hope it helps. All the credit and the blame go to ChatGPT.

I went over the plan and it looked decent. Whether it can be done in 30 days or not, it depends on the person and the time he spends on it.
Just came back from Tableau Conference 2022 at Las Vegas. What an exciting event! The most exciting thing is reuniting with old friends and meeting with the datafam people known online for years.

Attended first time the Tableau Visionary summit.
A little enhancement in the formula editor can make a big difference for whose who create formula all the time in Tableau. Here are my wishes for a future editor. 

Highlighting Syntax Words

Currently a formula in Tableau can look plain and a bit uninspiring.
Blog Archive
Loading
Dynamic Views theme. Powered by Blogger. Report Abuse.