2 Replies Latest reply on Dec 20, 2016 3:15 PM by indy poo

    How to do the calculation in Tableau?? Easy ??

    indy poo

      Hi Gurus,

       

      I've a chart with 3 colors Red,Green and Yellow of a bar chart.

      In this case,

      I want to calculate the formula  % of Green color- % of Red color .

       

      Here in this case  81%-13% = 68% , need the formula for this one.

       

      Please help me how do I calculate this formula  from the bar values in this chart.The selection should be same, not  be altered due to the requirement.

      Attached is the package.

       

      Regards,

      Indy

        • 1. Re: How to do the calculation in Tableau?? Easy ??
          Maciek La

          Hi!

          I've created 3 helper fields but this can be done in a single field also:

           

          Detractors:

          if [Comments] ="Not at all likely (0-3)"

          or [Comments] ="Not so likely (4-6)"

          then [Comments] END

           

          Passives:

          if [Comments] ="Somewhat likely (7-8)"

          then [Comments] END

           

          Promotors:

          if [Comments] ="Extremely likely (10)"

          or [Comments] ="Very likely (9)"

          then [Comments] END

           

          and then added difference field:

          (COUNT([Promotors])-COUNT([Detractors]))/

          (COUNT([Passives])+COUNT([Promotors])+COUNT([Detractors]))

          1 of 1 people found this helpful
          • 2. Re: How to do the calculation in Tableau?? Easy ??
            indy poo

            Thanks Maciek,

             

            Its working  now with your logic, thanks for looking into it  though i have not elaborated much on this.

             

            Thanks for our help on this.

             

            Regards,

            indy