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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Max Function within Calculate

I have a page that has several measures and visuals that uses a Report Period filter. For this example I have the page filtered on report period 201810, 201811, and 201812. Within this page I am using the swap rate, for which I have a seperate table which I have linked to the other data table. I essentialy want this measure to only use the highest swap rate, in this case, 201812, and not the sum of the 10,11, and 12, which it is currently doing.

 

CALCULATE(SUM('Swap Rates'[2_Yr_Swap]),'Swap Rates'[Report_Period]=MAX('Swap Rates'[Report_Period]))
1 ACCEPTED SOLUTION
Anonymous
Not applicable

I read another post that solved this using filter before using max

CALCULATE(SUM('Swap Rates'[2_Yr_Swap]),FILTER('Swap Rates','Swap Rates'[Report_Period] = MAX('Swap Rates'[Report_Period])))

View solution in original post

1 REPLY 1
Anonymous
Not applicable

I read another post that solved this using filter before using max

CALCULATE(SUM('Swap Rates'[2_Yr_Swap]),FILTER('Swap Rates','Swap Rates'[Report_Period] = MAX('Swap Rates'[Report_Period])))

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.