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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
d474boy
Helper I
Helper I

Calculate a daily proportion over all days in filtered month

I have a table of Jobs received on all days over several years.

Each Job has a target completion time and I can calculate if the completion time has been met.

I want to calculate the proprtion of all Jobs on each day that were completed on time.

Then I want the total number of days in a month where the proportion is >= 95%.

I have a report sheet that has a filter for the month in which Jobs were receieved, so I am only looking at 28-31 days of Jobs at a time.

I have a bar/line chart that shows the number of Jobs received each day and the proportion that were completed on time.

I can create a measure that calculates, for each day, if the proportion was over 95% or not (see formula below):

_ProportionOnTimeGe95pc = if([_ProportionCompletedOnTime]>=0.95,1,0)

That's easy.

But I then just want a Card visual that shows the Total of the 0s and 1s over all the days.

I thought that it just needed to create another measure that was:

SUM([_ProportionOnTimeGe95pc])

but this doesn't work.

Please help.

5 REPLIES 5
d474boy
Helper I
Helper I

My PBIX model 

 

Do I need to 'share' this file through OneDrive for you to be able to open it? @wzkoral @V-lianl-msft 

V-lianl-msft
Community Support
Community Support

Hi @d474boy ,
 
Measure is calculated based on the current context. Your expression is incorrect and does not use the correct filter function.
You can try the countrows function.
If the problem persists,could you please share sample data or sample pbix?(Please mask any sensitive data before uploading)
 
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi Liang

 

I have created a cut-down PBIX data model with all my queries and attempt to work around the problem. I will upload it now.

 

Thanks for helping

wzkoral
Advocate II
Advocate II

Share some sample data pbix or show some screenshots, with model relation,
What u see when u create a simple table with this measure _ProportionOnTimeGe95pc = if([_ProportionCompletedOnTime]>=0.95,1,0)

Hi

 

I am going to upload a PBIX now (once I can work out how to).

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.