2 Replies Latest reply on Apr 6, 2012 8:52 AM by gall3on

    Comparison Within The Same Measure and Dimension


      I'm not sure if I titled this appropriately...Below is what my raw table looks like...


      DateLeadsSalesSpendConversion (calculated field)CPL (calculated field)Yesterday (calculated dimension)
      4/2/20124725 $               500 1.06%$1.06 Yesterday
      3/26/2012506122 $               750 24.11%$1.48 Last Week
      3/27/201235078 $               400 22.29%$1.14 Ignore
      3/28/2012400125 $               275 31.25%$0.69 Ignore
      4/1/2012600200 $               300 33.33%$0.50 Ignore


      The last 3 fields are all calculated in Tableau and changing the table orientation as it is would require a lot of work.


      I need to show a Table in a dashboard the compares "Yesterday" and same day "Last Week" across those KPIs.


      Row LabelsLeadsSalesSpendConversion Rate
      Last Week50612275024%


      On top of that, I need to add some sort of KPI Mark to show if the Measures from "Yesterday" performed better or worse compared to same day "Last Week".  IE, since yesterday's leads were less than same day last week, I need a KPI Mark of 'x' to show up next to the Leads for 'Yesterday'.

        • 1. Re: Comparison Within The Same Measure and Dimension
          Jonathan Drummey

          Hi Abigail,


          Could you post a packaged workbook with some sample data? There are several different ways to accomplish what you want in Tableau, but the exact method depends on how your data is organized and how your views are laid out.


          For example, if you want to have different KPIs for different measures, you probably won't be able to use Measure Names/Measure Values, since Tableau only allows for one calculated field on the Marks card and that field is not sensitive to exactly which Measure Name/Value is being drawn. Most likely you'll need to use the extra axes technique. I put together a workbook outlining a bunch of different options here:



          In the case where you want the KPI to be based on a comparison from one row to the next, the LOOKUP() function is one way to get there, but exactly how it gets used again depends on how your data is set up.



          1 of 1 people found this helpful
          • 2. Re: Comparison Within The Same Measure and Dimension

            Thanks, Jonathan.


            I was actually able to get the view I was trying to accomplish.  I did reference the color coding column techniques and used a table calculation (window_max()) to help determine which shape needs to be shown.


            It took a lot of work but I was able to do the same to compare by week and by month as well.


            Message was edited by: Abigail Bautista added image