1 Reply Latest reply on Feb 16, 2018 12:43 PM by Michael Hesser

    Excel Formula Convert in Tableau

    Mithu Bhudolia
        • 1. Re: Excel Formula Convert in Tableau
          Michael Hesser

          Hi Mithu; I posed a potential answer in Forums.

           

          Step 1: Create two calcs to get the value of your two metrics

          Step 2: Create two comparative calcs. These determine the relationship between your Metric name and first and second measure, respectively.

          Step 3: Concatenate the two comparative calcs

           

          GV%

          round({fixed:sum(iif([Metric name]="GV",[Change %],0))},2)

           

          GV-IYA%

          round({fixed:sum(iif([Metric name]="GV-IYA",[Change %],0))},2)

           

          GV Relation

          if SUM([Change %])< avg([GV%]) THEN

               max([Metric name])+" is less than 'GV' "+str(avg([GV%]))

          elseif SUM([Change %])= avg([GV%]) THEN

               max([Metric name])+" is equal to 'GV' "+str(avg([GV%]))

          else

               max([Metric name])+" is greater than than 'GV' "+str(avg([GV%]))

          END

           

          GV- IYA Relation

          if SUM([Change %])< avg([GV-IYA%]) THEN

               " and is less than 'GV-IYA' "+str(avg([GV-IYA%]))

          elseif SUM([Change %])= avg([GV-IYA%]) THEN

               " and is equal to 'GV-IYA' "+str(avg([GV-IYA%]))

          else

               " and is greater than than 'GV-IYA' "+str(avg([GV-IYA%]))

          END

           

          COMMENT

          [GV Relation]+[GV- IYA Relation]