1 Reply Latest reply on Jun 26, 2018 12:57 PM by Love Tableau

    Sum percentages in a Pie Chart?

    Bill Li

      Hi everyone,

       

      Is there a way to do the sum for percentages?

       

      Like in this case: 7.86%+5.11%+3.41%+11.54%=27.92%

       

      Background: the reason why it's not summing to 100% is that we used different denominators for the business need.

       

      Appreciated your help in advance.

        • 1. Re: Sum percentages in a Pie Chart?
          Love Tableau

          I am not Sure if I understood you correctly but based on my understanding I took the sample dataset which comes with tableau (SuperStore)and created individual calculations for each segment

          For Consumer Segment

          IF ATTR([Segment])="Consumer" THEN (SUM([Sales])/TOTAL(SUM([Sales])))*100

          END

          That gave me % of Consumer

          Similarly the remaining two such as "Corporate" and "HomeOffice"

          Create another calculation Sumpercentages where it adds Consumer+HomeOffice+Corporate

           

          Kindly Let me know if this is not what you are looking for