1 Reply Latest reply on May 16, 2018 7:48 PM by swaroop.gantela

    Percentage difference duplicating for 2 different metrics

    Melanie Ceder

      Hi tableau experts - I have a dashboard that pulls 5 different metrics in comparing this year to last year using a ton of calculated dimensions/parameters/metrics. I'm trying to show percentage difference (in a different worksheet, though if it could be in same worksheet that would be awesome). I'm getting a bunch of 0%s for the first metric (which is joined from a separate data source so maybe that's why?) and then for the other 4 I'm getting duplicates (might be because 2 of them are calculated fields based off the other 2?). Please help!

       

      Packaged workbook on v10.4 attached. Thanks so much!

        • 1. Re: Percentage difference duplicating for 2 different metrics
          swaroop.gantela

          Melanie,

           

          There likely is a way to get it to work using the Quick Table Calculation method,

          but I couldn't quite find it. However, I was wondering if it would suffice to write a new calculated field.

           

          On your Percent Difference sheet, I tried a calculation with Visits and used a round-about formula of:

          IF ATTR([Total].[Time Period Test])="Current Year" THEN

          (2*SUM([Visits]) - TOTAL(SUM([Visits]))) / (TOTAL(SUM([Visits]))-SUM([Visits]))

          END

           

          This way the only Table Calculation is the Total which seemed to work

          when setting a Compute Using of "Table Across". It did have the drawback

          of having the empty Last Year column.

           

          I didn't thoroughly check to see if it was producing all the right numbers,

          or if it would work for all of your measures.

          Please see workbook attached in the Forum thread.