Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
deepvibha
Advocate II
Advocate II

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):

 

NABH QI_002.png

How do I calculate these percentages?

The unpivoted data in Power BI looks like:

 

1.png

 

Thanks in Advance.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1 ACCEPTED SOLUTION
v-yuezhe-msft
Employee
Employee

@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.

1.PNG2.PNG

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.
1.PNG

Regards,

 

Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-yuezhe-msft
Employee
Employee

@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.

1.PNG2.PNG

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.
1.PNG

Regards,

 

Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-yuezhe-msft

 

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

 

Regards,

Deepak

@v-yuezhe-msft

 

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

 

Regards,

Deepak

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.