Forum Discussion

deepvibha's avatar
deepvibha
Advocate II
7 years ago
Solved

Quality Indicators Monthly Percentage

Hello,

I am maintaining quality indicator data in the following format in MS Excel:

MonthIndicatorPt. Completed <= 30 minPt. Completed <= 90 min.Total no. of OPsurgery accep. Pts. within 12 weeksSurgery advised pts. Within 12 weeks
Oct-16Initial Assessment Time1344902070600
Oct-16No of patient seen <90 min.014233000
Oct-16Waiting time for cataract surgery00022663094
Oct-16Bed Occupancy rate00000
Oct-16ALOS00000
Oct-16Rescheduled surgeries00000
Oct-16No.  of reporting errors (Lab)00000
Oct-16No. of re dos (Lab)00000
Nov-16Initial Assessment Time1333002164700
Nov-16No of patient seen <90 min.015012000
Nov-16Waiting time for cataract surgery00025513498
Nov-16Bed Occupancy rate00000
Nov-16ALOS00000
Nov-16Rescheduled surgeries00000
Nov-16No.  of reporting errors (Lab)00000
Nov-16No. of re dos (Lab)00000

 

I wish to calculate the monthly % of each quality indicator, as follows:

Initial Assessment Time = Pt. completed <= 30 min. / Total no. of OP

                              [For Oct 2016 it works to be 13449/20706 = 65%]

                              [For Nov 2016 it works to be 13330/21647 = 62%]

 

Within 90 Min = Pt. completed <= 90 min. / Total no. of OP

                              [For Oct 2016 it works to be 14233/20706 = 69%]

                              [For Nov 2016 it works to be 15012/21647 = 69%]

So on and so forth for all months and other indicators as well. After this, it has to be plotted on a combo chart as follows (The chart below is indicative and not matching to actual calculation above):

 

How do I calculate these percentages?

The unpivoted data in Power BI looks like:

 

 

Thanks in Advance.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  • Anonymous's avatar
    Anonymous
    7 years ago

    deepvibha,

    Before you unpivot columns in Power BI Desktop query editor, you can replace 0 values in Total no. of OP column with null, then fill down.



    Then create the following measures in your table.

    % Pt. Completed<30 = DIVIDE(CALCULATE(SUM(Table1[Nos]),FILTER(Table1,Table1[Details]="Pt. Completed <= 30 min")),CALCULATE(SUM(Table1[Nos]),FILTER(Table1,Table1[Details]="Total no. of OP")),0)
    % Pt. Completed<90 = DIVIDE(CALCULATE(SUM(Table1[Nos]),FILTER(Table1,Table1[Details]="Pt. Completed <= 90 min.")), CALCULATE(SUM(Table1[Nos]),FILTER(Table1,Table1[Details]="Total no. of OP")),0)
    % surgery accep. Pts. within 12 weeks = DIVIDE(CALCULATE(SUM(Table1[Nos]),FILTER(Table1,Table1[Details]="surgery accep. Pts. within 12 weeks")), CALCULATE(SUM(Table1[Nos]),FILTER(Table1,Table1[Details]="Total no. of OP")),0)
    % Surgery advised pts. Within 12 weeks = DIVIDE(CALCULATE(SUM(Table1[Nos]),FILTER(Table1,Table1[Details]="Surgery advised pts. Within 12 weeks")), CALCULATE(SUM(Table1[Nos]),FILTER(Table1,Table1[Details]="Total no. of OP")),0)


    However, it is not possible to put all the measures in the above chart as you describe, as the measures will be calculated to return different results based on the fields in  the chart, you can create a table visual to view the results instead.


    Regards,

     

    Lydia

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    deepvibha,

    Before you unpivot columns in Power BI Desktop query editor, you can replace 0 values in Total no. of OP column with null, then fill down.



    Then create the following measures in your table.

    % Pt. Completed<30 = DIVIDE(CALCULATE(SUM(Table1[Nos]),FILTER(Table1,Table1[Details]="Pt. Completed <= 30 min")),CALCULATE(SUM(Table1[Nos]),FILTER(Table1,Table1[Details]="Total no. of OP")),0)
    % Pt. Completed<90 = DIVIDE(CALCULATE(SUM(Table1[Nos]),FILTER(Table1,Table1[Details]="Pt. Completed <= 90 min.")), CALCULATE(SUM(Table1[Nos]),FILTER(Table1,Table1[Details]="Total no. of OP")),0)
    % surgery accep. Pts. within 12 weeks = DIVIDE(CALCULATE(SUM(Table1[Nos]),FILTER(Table1,Table1[Details]="surgery accep. Pts. within 12 weeks")), CALCULATE(SUM(Table1[Nos]),FILTER(Table1,Table1[Details]="Total no. of OP")),0)
    % Surgery advised pts. Within 12 weeks = DIVIDE(CALCULATE(SUM(Table1[Nos]),FILTER(Table1,Table1[Details]="Surgery advised pts. Within 12 weeks")), CALCULATE(SUM(Table1[Nos]),FILTER(Table1,Table1[Details]="Total no. of OP")),0)


    However, it is not possible to put all the measures in the above chart as you describe, as the measures will be calculated to return different results based on the fields in  the chart, you can create a table visual to view the results instead.


    Regards,

     

    Lydia

    • deepvibha's avatar
      deepvibha
      Advocate II

      Anonymous

       

      Heartfelt thanks for the solution. I was struggling for some time now as I wanted to find a solution myself.

       

      Regards,

      Deepak

    • deepvibha's avatar
      deepvibha
      Advocate II

      Anonymous

       

      Heartfelt thanks for the solution. I was struggling for some time now as I wanted to find a solution myself.

       

      Regards,

      Deepak