Klaus Schulte Profile picture
Jan 21, 2022 15 tweets 9 min read Read on X
On Wed I shared this visualization on @tableaupublic: public.tableau.com/app/profile/kl…
The feature I like most is the custom axes in my parallel coordinates plot, something we cannot do out of the box in @tableau.
I thought it was interesting to share the steps to get there in a THREAD.
(1/13)
CW: A wild mix of Tableau functions will be leveraged, including exotic functions like LOG, POWER, CEILING and FLOOR...
(2/13)
The data Model
An axis needs a ruler and some tick marks. Therefore in my axis model you see 1 ruler object and 12 tick mark objects (more on that later). For each object I need 2 points to draw a line (->2 points in Model). Relationship on 1=1 to put everything together.
(3/13)
The scalings of the axes depend on the range to be displayed. To keep it dynamic, we need a couple of calculations to find the maximum and the minimum value (could also be a constant like 0) on each axis, and to calculate the range between both.
And now the fun begins...
(4/13)
First thing we need to do is to calculate the logarithm to base 10 of my ranges using the function LOG. This gives us back the value by which we have to exponentiate 10 to get the ranges back.
(5/13)
Next step is to use CEILING to round up the value from the previous step. This way we determine the number of digits of the respective range, e.g. 5 digits for the DREB range of 11,367.
(6/13)
Then I calculate the difference between the log value and the ceiling value of the log value, to determine the actual scale in the next step.
(7/13)
The scale is calculated with POWER & the ceiling value. For diff>-0.30103 it will be 10 to the power of the ceiling value -1 (0.01, 0.1, 1, 10, 100,...)., for the next range (-0.60206 till -0.30103) I divide by 2 (0.05, 0.5, 5, ...) and else by 4 (0.025, 0.25, 2.5, 25).
(8/13)
Now we can use this Axis scale value to determine the minimum and maximum tick mark, using our Min and Max KPI value and again the CEILING and the FLOOR function...
(9/13)
...which will give us eventually the number of ticks needed on our axis.

If you've made it until here: we're almost there!
(10/13)
For the tick labels, we start with Tick_min (see step 8) and add further steps as long as the (Object ID-1) is less or equal than the number of steps needed.
(11/13)
Last step: calculate the position of each value based on Tick_max and Tick_min. This does not necessarily have to be an aggregation like I did here.
And that's it! Congratulations, you've made it through the thread.
Almost.
(12/13)
I you want to check the workbook @tableaupublic to see how I've put together the view follow the link: public.tableau.com/app/profile/kl…
(13/13)
Is all of this relevant for business users? For 99.9% of them probably not. I can imagine very few use cases, for example when you want to reverse an axis on user control. Or when you just want to bring in axes where Tableau by default doesn't.
Thanks for reading!

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Klaus Schulte

Klaus Schulte Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us!

:(