Custom Scroll Control for Synchronized Scrolling

Sep 21, 2018

Klaus Schulte

Custom Scroll Control for Synchronized Scrolling. — When I did this week’s #workoutwednesday challenge, I learned how to use the Index-Formula to filter measures within a view to create the BANs in my viz (click the image to play with the interactive version on Tableau Public). Probably not too spectacular to many of you.

#workoutwednesday

When I was thinking about this new finding I remembered a discussion on twitter where some guys discussed their need for synchronized scrolling in multiple sheets on their business dashboards. There is also an idea in the Tableau Community Forum to implement this as a standard feature in upcoming Tableau versions with already lots of votes.

I used my new knowledge about the index-formula to create a workaround for such a synchronized scrolling like in this example (click to play with the interactive version on Tableau Public).

Custom Scroll Control for Synchronized Scrolling

(There are for sure better ways to visualize Sales and Profit, so please take this visualization just as an example.)

If you have two or multiple tables or graphs with the same granularity (imo the only case where synchronized scrolling does make sense) und you feel the need for this, just implement the following few formulas in your viz:

1. Create two index formulas

index columns
index rows

and make them discrete.

convert to discrete

2. Add both formulas to your viz

bring formulas to viz

Make sure that Index Columns is computed across the table and Index Row down the table.

3. Create two “Scroll-Parameters”

Create two parameters like this one:

Create parameters

Note: It has to be a range-parameter to get the little arrows for controlling the parameter.

4. Create conditional filters

That’s the trick: with this custom scroll control you don’t actually scroll but filter rows and columns out of the viz.

Create two boolean calculations to filter the viz on Index Column and/or Index Rows:

Filter on Columns
Filter on rows

5. Bring the filters to your viz

Make again sure that the filter Index Columns is computed across the table and the filter Index Row is cumputed down the table. Both boolean calcs have to be ‘true’.

Applying filters

6. Implement Custom Scroll Control for Synchronized Scrolling

Create the dashboard. For the real look and feel make sure that your tables or vizzes have same widths and heights. I hid the headers for the index-dimensions and customized the parameter not showing the readout box.

Custom Scroll Control for Synchronized Scrolling
Custom Scroll Control for Synchronized Scrolling

That’s it.

Custom Scroll Control for Synchronized Scrolling: A quite simple approach, I wouldn’t be surprised if it has been ‘invented’ before (but haven’t searched for it).

Hope you enjoyed reading and find use cases for this!

25 COMMENTS


Avatar
Sep 22, 2018, 4:27:16 PM
Ken Flerlage says:

Nice trick!


Avatar
Feb 13, 2019, 4:47:47 PM
William Guicheney says:

Honestly amazingly creative work Klaus, I love the fact that this has been possible for a very long time using basic Tableau functionality but neither me or my colleagues have ever thought about it! Creative and elegant, congratulations!


Avatar
Jan 19, 2019, 4:18:10 PM
Cathy liu says:

Hey, Klaus, I think this synchronized scrolling is so appealing and I actually amazed by all of your dashboards. However I am not familiar with synchronized scrolling. Could you show me how to create this step by step? Greatly appreciate!


Avatar
Sep 24, 2019, 11:42:58 PM
David Parker says:

Very Very Very clever, thank you. Only problem is that it doesn’t work when you have a data grid with multiple measure values.


    Avatar
    Oct 22, 2019, 8:40:56 PM
    Mary says:

    Yes very clever, thanks!. I had same issue with measures across columns. Index only shows 1 for each column. Was there a resolution?


    Avatar
    Sep 25, 2019, 11:31:59 AM
    Klaus Schulte says:

    Thank you David! Not sure about why it shouldn’t be possible in your case though. Happy to take a look at it!


Avatar
Nov 19, 2018, 3:36:11 PM
Travis Hauck says:

Nice workaround! One question: why does this work on both sheets if only one sheet has the Index calculation? I’m just having trouble understanding how Tableau knows to filter the second sheet if the Index formulas aren’t present there?


    Avatar
    Nov 19, 2018, 4:29:01 PM
    Klaus Schulte says:

    Hey Travis, actually the index formulas are present on both sheets. You can see both sheets bei right-clicking on the dashboard tab at the bottom and selecting “unhide all sheets”. Then you can see, that both filters in the filter shelf are applied to both sheets.


Avatar
Apr 9, 2020, 10:01:38 PM
Anila says:

Is there any way to flip the scroll up/down parameter? It is so counter intuitive to scroll left to right for the up/down purpose. Any visual hacks for that?


Avatar
Nov 8, 2018, 9:17:07 PM
Paulina says:

Great thinking! However, when I try to use the indexes on a trend line graph (using discrete or continuous dates) the Index function breaks my lines into points. Any ideas how to get this to work with line graphs?


Avatar
Dec 12, 2019, 1:20:08 AM
Bayan Bevrani says:

Hi Klaus, I two of my worksheet have the same rows but the level of detailes are different. Hence the index() for each talbe is different any idea how I coud fixed the index number when each table have differnt LODs? thanks.


Avatar
Nov 2, 2018, 8:36:54 PM
D says:

This was useful but can we disable individual scroll bars and use only the synchronized bar to scroll vertically. I need to display four sheets side by side and used this sync bar concept. But individual vertical scroll bars is my problem.


    Avatar
    Apr 20, 2020, 11:42:31 AM
    Erwin says:

    You might change the calculations to:
    Filter Columns: [Index Columns]>=[Scroll-Control left & right] and [Index Columns]=[Scroll-Control up & down] and [Index Rows]<=[Scroll-Control up & down]+26

    The 5 and the 26 will match to the size of the view in which it is displayed.
    Hope it works at your side too.


      Avatar
      Apr 20, 2020, 12:07:39 PM
      Erwin says:

      Something went wrong with my previous comment. It should be:
      Filter Columns:
      [Index Columns]>=[Scroll-Control left & right] and [Index Columns]=[Scroll-Control up & down] and [Index Rows]<=[Scroll-Control up & down]+26

      The 5 and the 26 arranges the match in the view and therefor removes the original scroll bars.

      I hope this works for you too.


    Avatar
    Nov 2, 2018, 9:01:12 PM
    Klaus Schulte says:

    IMO the only way to do this would be to make the sheets floating and put them partly on top of each other so that the scroll bar disappears. But this wouldn’t of course disable the use of the scroll wheel.


Avatar
Oct 1, 2019, 5:53:56 PM
Christa Hamilton says:

I followed all of the steps, my only difference is I am only trying to scroll up and down. The left to right is not necessary. I can’t get it to work. Do I need to do the same as other filters, where I say apply to all in dashboard? Thanks!


    Avatar
    Oct 1, 2019, 5:59:29 PM
    Klaus Schulte says:

    Hi Christa, yes you have to apply the filter to both (or all) sheets you want to scroll simultaneously. Are you able to share a workbook? Happy to take a look.


Avatar
Oct 9, 2018, 1:16:21 AM
Leonid says:

Is there a way to limit scrolling to only max index values or restart scrolling after max index value reached?


    Avatar
    Oct 9, 2018, 10:37:52 AM
    Klaus Schulte says:

    You could use a dynamic parameter dashboard extension. But then you’ll loose the control buttons, which is part of the fun I think.


Avatar
Mar 10, 2019, 4:36:34 PM
BERNADETTE DUPONCHEL says:

Ok, I tried, but it is not working for me
I have state going down and years going across, 2015 and 2018
The index column only shows 1 and 2 repeated for each of the state, with 1 for year 2015 and 2 for year 2018
Further, the filter slider only affect one of my 3 tables
Any insight as to what I did wrong?