3 Replies Latest reply on May 5, 2012 9:00 PM by Jonathan Drummey

    Overlapping more than 2 measures on same axis

    Eric Maher

      I have a visual that graphs the actual spend of an individual item over time and what spend would have been (over the same period of time) given a different cost of the item. This helps our Supply Chain group predict what they may spend in the future (given similar buying patterns) if the price of an item increases or decreases. There is a parameter for 'new price' which allows them to easily see potential impact of a single item as the price is changed.


      The first image In the attached file shows what I currently have. 2 overlapping measures (actual and projected). When I showed this to my customer they wondered if I could change the green to red when the projected spend was greater than the actual spend (see 2nd half of year).


      The second image is where I'm at now... I'm wondering if what I want to do is possible. In a nutshell I would like to have 3 overlapping measures where each has it's own mark-type so I can adjust width enabling everything to be seen. To accomplish this, I created 2 additional calculations:

      Decreased Spend: Totals projected spend when projected spend is less than actual- otherwise it is 0.

      Increased Spend: Totals projected spend when projected spend is greater than actual - otherwise it is 0.

      I figured this would allow them to exist on the same axis and would essentially show GREEN or RED per the requirement.


      I am also not quite understanding the nuances of when I can/can't use multiple mark-types.

      Any help is appreciated and let me know if I have not provided adequate information.

      Thank you


        • 1. Re: Overlapping more than 2 measures on same axis

          Dear Eric,


          In order to recreate the view that you require visually, I would use 'Measure Names + Measure Values' on one of the axis and use the Spend measure on the second axis. This way you can overlap the charts - see attached sample. Is that what you want?


          As I understand, Multiple Mark Types option is visible only when you have Dual Axis selected.


          Did you need further help on the calculations for Decreased and Increased spends too? If so, can you please attach the Tableau workbook so that I can help you with that?




          • 2. Re: Overlapping more than 2 measures on same axis
            Eric Maher

            Siraj- Thank you so much. I had the formulas and felt like it should have been working but couldn't quite get it. The idea of filtering on the Measure Names (and not including the SPEND value) seemed counter intuitive.

            I appreciate the help.


            • 3. Re: Overlapping more than 2 measures on same axis
              Jonathan Drummey

              Hi Siraj,


              Nice work! Just an FYI, most** any green (continuous) pill on Rows or Columns can have its own Mark Type, in other words you can have multiple mark types without dual axes. I use them in cases such as having a bar chart side-by-side with shape marks for Key Performance Indicators.


              ** When you have a green pill on the Rows shelf and a green pill on the Columns shelf, Tableau assumes you are drawing a scatterplot and only lets you have one mark type. If you put those two pills on Rows or Columns, or add a third pill to either Rows or Columns, then you can have multiple mark types.


              The one other "gotcha" here is that there can only be one Mark Type that applies to the instance of Measure Names/Measure Values in the view.