2 Replies Latest reply: Dec 15, 2014 12:57 PM by Kristina Stephenson RSS

    percentages in stacked bar chart

    Kristina Stephenson

      Hi All,

      I have attempted adding percentages to a pop up for stacked bar chart a few different ways but am not having much success. I have tried creating the stacked bar charts 2 different ways:



      PaymentCategory (IP-Surgical, Tests, Hospice, SNF, etc.)

      Organization (Org1, Org2, Other)




      (SUM(pay_amt)/(SUM(TOTAL MemberMonths)))*12










      Org1 PMPY $


      (SUM({<Organization={'Org1'}>}pay_amt)/(SUM(TOTAL MemberMonths)))*12

      Org2 PMPY $

      (SUM({<Organization={'Org2'}>}pay_amt)/(SUM(TOTAL MemberMonths)))*12

      Other  PMPY $

      (SUM({<Organization={'Other'}>}pay_amt)/(SUM(TOTAL MemberMonths)))*12


      Each of these methods creates a stacked bar chart with 3 stacked pieces in each bar showing the PMPY $ for Org1, Org2, and Other in different colors. I want to be able to create  a pop up that shows the percentage of PMPY $ for each organization out of the total PMPY $ for that payment category (i.e. percentages for each bar should add up to 100).


      Does anyone have any suggestions?


        • Re: percentages in stacked bar chart
          saurabh singh


          What if you check mark 'relative' in expression tab of the chart properties it would give you values in 100%.




            • Re: percentages in stacked bar chart
              Kristina Stephenson

              Yes, but I want to show the actual PMPY $ as well as the percentage so if I select relative for the bar chart it only shows the percentage. So I tried not selecting relative and creating a pop up with relative selected. However this is not working:

              ='# = '&$(vTotal#)&chr(10)
              &'% of Total PMPY $ =' &
              IF(Organization='Org1',((SUM({<Organization={'Org1'}>}pay_amt)/(SUM(TOTAL MemberMonths)))*12)/((SUM({<Organization>}pay_amt)/(SUM(TOTAL MemberMonths)))*12),
              IF(Organization='Org2',((SUM({<Organization={'Org2'}>}pay_amt)/(SUM(TOTAL MemberMonths)))*12)/((SUM({<Organization>}pay_amt)/(SUM(TOTAL MemberMonths)))*12),
              SUM({<Organization={'Other'}>}pay_amt)/(SUM(TOTAL MemberMonths)))*12)/((SUM({<Organization>}pay_amt)/(SUM(TOTAL MemberMonths)))*12)))

              I would like both the PMPY $ and percentage of PMPY $ to be displayed in the pop ups