Search code examples
histogramtableau-apimultiple-columnstableau-desktop

Tableau: Subset multiple time dependent histograms into multiple rows and columns to fit the screen


I am trying to replicate the plot below (done with ggplot in R) using Tableau:

enter image description here

However, I can't see how I can subset the plot so it fits the screen using Tableau. Using Tableau, this is what I get:

enter image description here

I've attempted adding the following but it stops plotting the histograms and ends up messier:

Row Divider (Discrete):

INT((INDEX()-1)/(ROUND(SQRT(SIZE()))))

Columns Divider (Discrete):

(INDEX()-1)%(ROUND(SQRT(SIZE())))

How can I achieve the plot in R using Tableau?

P.S.: The datasets are different in case you were wondering why Monday doesn't look the same.


Solution

  • You're on the right path using Row-Column divider, but you need to go some step further using the small multiple technique.

    For instance, you need to move WEEKDAY in the detail mark and then, use column and row divider in column and row shelf.

    Doing so, you'll also need to right-click on CNT/Ride Id Hash) and compute it with WEEKDAY.

    Here's a cool guide by a Tableau Zen master showing how to work with this tecnique: https://www.vizwiz.com/2016/03/tableau-tip-tuesday-how-to-create-small.html