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 of a measure

Hi everyone,

 

I have a measure, called Revenue. This measure is as follows:

VAR maandselectie =
    SUM ( 'Maand selectie'[Index maand] )
VAR jaarselectie =
    SUM ( 'Maand selectie'[Index jaar] )
RETURN
    CALCULATE (
        SUM(Verkoopfacturen[Bedrag]),
        Datumtabel[Index maand] <= maandselectie,
        Datumtabel[Index jaar] = jaarselectie
    )
 
This is the outcome of that measure. 


MaxRevenue_community.png

 

I want to have a new measure, which returns for all months the highest result of Revenue, so 1.646.498. I tried many things already, like RemoveFilters, All, AllExcept, but I can't figure it out. Can someone help me with this? 
Thanks in advance!

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @Anonymous ,

 

For this you need to use a iterator formula something similar to:

Revenue MAX = MAXX(VALUES(Table[MonthYear]), [Revenue])

 

This should return the expected result.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

2 REPLIES 2
MFelix
Super User
Super User

Hi @Anonymous ,

 

For this you need to use a iterator formula something similar to:

Revenue MAX = MAXX(VALUES(Table[MonthYear]), [Revenue])

 

This should return the expected result.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Anonymous
Not applicable

@MFelix This is what I needed!! 

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.