2 Replies Latest reply on Mar 2, 2017 6:56 AM by Stuart Dunlap

    Side by Side Timeseries with Measure Values

    Stuart Dunlap



      I'm trying to create a dashboard that will show time series data side by side for a group of customers.  (I'm using Tableau 9.3 with the Superstore dataset)


      In my mocked up example (attached) I have my starting point in Worksheet 'Side by Side Time Series 01'.  From here, I want to add Profit to the Sales axis so that a Sales and Profit timeseries show up in the same panel.  However when I do this, I get the result in the 'Side by Side Time Series 02' worksheet.  I realize this is beause I have Measure Names on the Columns shelf.  I tried to use a calculation with something like IF Measure Names = 'Sales' OR Measure Names = 'Profit' THEN 'Sales & Profit' ELSE Measure Names END ... however this is not possible because Measure Names isn't exposed as a 'field' that can be used in a calculation - probably for a good reason.


      I can attempt a solution in a dashboard, however I have not been able get the row for each customer perfectly aligned.  I have a mock up of this in the dashboard called 'Alt Side by Side DashOut 1'.  In this example I only want to show headers for the left most worksheet and I want headers off for the worksheet on the right.  When I do this, I have to play with the precise sheet location to try and line up the rows.  Manipulating the start of the rows manually in a dashboard would be a viable solution if I knew the row heights in the separate sheets were exactly the same height, however in my real world example, I've moved the Row heights around in each of the different worksheets and I can see now way to force an exact row height measure in each of the worksheets.


      Hopefully I'm missing something basic in my quest for a solution.  But if not, does anyone have alternate suggestions for accomplishing this?



        • 1. Re: Side by Side Timeseries with Measure Values
          Jonathan Drummey

          Hi Stuart,


          The easiest way to synchronize the two views on the dashboard is to make sure that the headers & labeling are the same on each, in this view I just right-clicked on the Customer Name label and turned off "Hide field name labels for rows":


          Screen Shot 2017-02-26 at 11.37.34 AM.png


          However this kind of view has a problem because as soon as the # of customers gets to be more than fit into a single window we end up with scroll bars for each.


          An alternative is to restructure the data. I duplicated the data source, used Tableau's pivot feature to make Sales, Profit, and Order Quantity all part of the pivoted data so now there's a row for each measure with a Pivot field names dimension, wrote a few simple SUM(IF... style calculations, and built this single worksheet view:


          Screen Shot 2017-02-26 at 11.41.39 AM.png

          Notice that Measure Names isn't being used here, instead I'm using the actual Pivot field names dimension which has all the functionality we might want Measure Names to have.


          v9.3 workbook is attached, let me know if you have any questions!



          2 of 2 people found this helpful
          • 2. Re: Side by Side Timeseries with Measure Values
            Stuart Dunlap



            Thank you for your two solutions.  In my particular case I can't go with the first one because The viz user could select thousands of dimension members (although that wouldn't be too informative for the structure of this viz )  - but selecting the top 50 would bring out the scroll bars and things could quickly get out of sync as you pointed out.


            The second solution is brilliant and is certainly a viable workaround for not being able to use Measure Names in an IF statement!  In my case, I haven't figured out a way to make this workable... I'm using a horizon chart with 10 layers and the layer size is defined dynamically by a parameter.  For the time being, I'm going with a different approach - but I know your suggestions will come in handy at some point.


            Thank you for your solutions!!