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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Uzi2019
Super User
Super User

Get the MAX of the measure based on filters applied

Hi Expert,

I have one calculated measure on which I want to calculate MAX of this measure with respect to the filter selected by users.

Input fields:

Measure Name = Profit Measure

Filters/Slicers available = Region, Week, Channel

Output:

Max of the Profit Measure based on values selected by users in those filters

 

I would really appreciate your help.

P.S. I tried with MAXX along with ALLSELECTED/REMOVEFILTERS/SUMMERIZE but nothing worked.

Don't forget to give thumbs up and accept this as a solution if it helped you!!!
1 ACCEPTED SOLUTION
Tahreem24
Super User
Super User

@Uzi2019 You can also try this measur:

Measure = MAXX(ALLSELCTED(TableName),[Profit Measure])

 

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard

View solution in original post

3 REPLIES 3
Tahreem24
Super User
Super User

@Uzi2019 You can also try this measur:

Measure = MAXX(ALLSELCTED(TableName),[Profit Measure])

 

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard
amitchandak
Super User
Super User

@Uzi2019 , Seem like @johnt75 has replied before me. So consider that reply before checking this. In case that does not solve the purpose, then consider this

 

You need to have something like this

 

Switch( True(),

selectedvalue(Slicer[Slicer])  ="Region", maxx(values(Table[Region]), [Measure]) ,

selectedvalue(Slicer[Slicer])  ="Week", maxx(values(Table[Week]), [Measure]) ,

selectedvalue(Slicer[Channel])  ="Week", maxx(values(Table[Channel]), [Measure])

)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
johnt75
Super User
Super User

It depends on which column or columns you want to group by. If you are only grouping by 1 column then you could use

Max profit =
MAXX ( VALUES ( 'Table'[Column] ), [Profit] )

If you are grouping by more than 1 column then use

Max Profit =
MAXX ( SUMMARIZE ( 'Table', 'Table'[Column 1], 'Table'[Column 2] ), [Profit] )

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors