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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
TRK
Helper II
Helper II

Filtering data by MAX value - within each year and a category - and update when other slicers used

I need to be able to identify the MAX value (of value field) by Composition for each year and filter the table to only show those MAX values.

 

I was able to do this with the following measures:

 

    Measure:

          Max Value = CALCULATE(MAX(page1_1[Value]), ALLEXCEPT(Page1_1, Page1_1[Fiscal year], Page1_1[compostion]))

 

     Calculated Column:

         IsMax =IF([Value]=[Max Value],1,0)

 

I then used the IsMax to filter the table using this column in the filter pane  and applying: If IsMax = 1

table IsMax no slicer.PNG

However, I am wondering how I could modify these measures so that if I deselect an item in another slicer  (ie. Blue M in the Especes slicer), it would actually recalculate the Max Value under compostion and year if there is anther species with the highest value now that the first highest is not selected.  (see 2013-14- PSP - with out Blue M would be MYE).

 

table IsMax with slicer.PNG

 

Thanks!

2 REPLIES 2
Greg_Deckler
Community Champion
Community Champion

Not sure I follow, perhaps: https://community.powerbi.com/t5/Quick-Measures-Gallery/Lookup-Min-Max/td-p/985814



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Unfortunately that did not give me what I need. Lookup Max returned the name of the compostion that had the highest value but what I need is the actual number (like I have in Max Value) - that works with (or like) the "isMax" (pink highlight)  so I can use that result to filter the visual to only show the max value (#)

 

-but I want it to recalculate that if I remove one of species - ie M Blue- so that the new highest value  would be the Max Value and the ISMax would show a 1 beside the  45 (not keep the 205).  (see original post for formulas used for Max Value and IsMax)

 

any suggestions?

 

measure.PNG

 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 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.

Top Solution Authors
Top Kudoed Authors