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
Anonymous
Not applicable

New measure to give a rate of SUM to MAX filtered by a value of third column for the latest month

Hello experts,

 

I'm trying to get a rate (%) that will be the sum of Hours / Max value of Estimated filtered by Code "SR" for the latest month.

 

Here is a sample of my data.

 

I have been stuck here for hours... Any help is much appreciated.

Thank you

 

Untitled.jpg

1 ACCEPTED SOLUTION
Cmcmahan
Resident Rockstar
Resident Rockstar

So for example, for July in your example data, this measure should return (.5+.75+.25)/9.96 = 15.06%?

 

Your measure would look like this:

SR Rate = CALCULATE( SUM(Table1[Hours]) / MAX(Table1[Estimated]), FILTER(Table1, Table1[Code] = "SR" && MONTH(Table1[Date]) = MONTH(NOW())-1)

View solution in original post

3 REPLIES 3
Cmcmahan
Resident Rockstar
Resident Rockstar

So for example, for July in your example data, this measure should return (.5+.75+.25)/9.96 = 15.06%?

 

Your measure would look like this:

SR Rate = CALCULATE( SUM(Table1[Hours]) / MAX(Table1[Estimated]), FILTER(Table1, Table1[Code] = "SR" && MONTH(Table1[Date]) = MONTH(NOW())-1)
Anonymous
Not applicable

Hi @Cmcmahan 

thank you vey much for your reply.

It did work indeed.

 

Could you please advice what I should change in the formula to get result for the previous month as well?

Thanks again!

July is the current previous month.  On September first, this would calculate for August data.

 

If you want to change what month is being calculated, change the month filter criteria. 

MONTH(Table1[Date]) = MONTH(NOW())-1

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.