3 Replies Latest reply on Aug 22, 2013 5:11 AM by Jim Wahl

    Dynamic Sizing of sheets based in Dashboard.

    James Charley



      We are working on one requirement where we want to resize the height of the sheet within dash board.


      Basically we have maximum 10 horizontal bar and we have set the height of the sheet to 350 px.


      Now depending on the filter no of bars can reduce e.g. it can be 1 or 5 or 7 but max 10.


      So sheet height should decrease within the dashboard without changing the bar size else it looks very ugly.

        • 1. Re: Dynamic Sizing of sheets based in Dashboard.
          Jim Wahl

          One, somewhat ugly tedious,  approach is to create a worksheet for each row and put all of the worksheets in a vertical dashboard object. set to Fit > Normal. This is a variation of the hide a worksheet trick: Creating a Sheet Selector for a Dashboard | Tableau Software.


          You can filter the rows by creating duplicate dimension as a filter and select > Apply to Worksheets > Selected Worksheets and choose all of the related worksheets.


          See attached. Let me know if you'd like some more detail. ...

          • 2. Re: Dynamic Sizing of sheets based in Dashboard.
            James Charley

            Hi Jim,


            I clearly did not understand this. I tried to open a workbook to understand it but it is failing by complaining data source does not exist at location in my local drive.

            • 3. Re: Re: Dynamic Sizing of sheets based in Dashboard.
              Jim Wahl

              Hi James,


              Sorry about that. Here are the steps I took and a copy of the workbook with an extract that should open.


              Here's where the result:

              2013-08-22 14-18-15.png


              The basic strategy was to put three copies of the same worksheet (with different filtered data) into a vertical layout container, which is shown above with the blue box and also in the Layout section of the left Side Bar. The vertical layout container allows you to group several worksheets and to hide a worksheet when all of the marks on the sheet are filtered or null.


              Here's more of a step-by-step:


              First, I created the core worksheet, which I expect is similar to what you have in your workbook:

              2013-08-22 14-17-15.png


              I filtered this to show just one Department and adjusted the height width and all other details (axis labels, scales, ...). The Fit setting should be set to Normal (or Width), since you want to fix the height. Finally, I removed the quick filter. It's not necessary and Tableau will be a little more efficient without it.

              2013-08-22 14-24-31.png


              Next, I duplicated the worksheet twice to get the rows for the other two departments. Of course, adjusting the filter so that I have one sheet for each department Furniture, Office Supplies, and Technology.


              Create a new dashboard. And drag a Vertical layout container (from the left Side Bar) on the Dashboard. Add the three worksheets to this container. The Layout section of the Side Bar should show the vertical container with the three worksheets. 

              2013-08-22 14-28-40.png


              Next, click on the pull down "triangle" for each worksheet in the dashboard and select Fit > Normal and unselect title (if you don't hide the title, it will remain even when the worksheet is hidden).

              2013-08-22 14-30-41.png


              The final step is to apply another filter to select / hide worksheets. There are a couple of ways to do this, but the easiest in this case is just to copy the Department dimension. Go to one of the worksheets, click on Department and select Duplicate to create Department (copy). Add this as a filter to the worksheet with all of the departments selected. Right-click on the filter and select Apply to Worksheets > Selected Worksheets and select the three worksheets that you've put in the vertical layout container.


              Now go back to the dashboard and select from the top menu Analysis > Quick Filters > Department (copy). Now you should have the final view.



              This approach isn't ideal. For starters, it's a bit tedious to develop and maintain. It's also not efficient, since Tableau needs to essentially run a query for each worksheet (how big of an issue is hard to say, given the similarity of the data perhaps Tableau's VizSQL caches or optimizes this).


              Lastly, unless you know that the bottom row will always be there(1), you need to have horizontal axis tick marks on each graph, which 1) takes up space and 2) is contrary to best practices for this type of  a small multiple graph. It's more efficient for the viewer to see just one set of tick marks on the bottom, which indicates all of the graphs are "linked".


              (1) If the bottom row won't be filtered, then you can unselect Show Header for each of the axes above the bottom graph.