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

Max value with multiple filters

I am needing to calcualte the Max Value for a data set that has multiple categories to sort through. The Max value needs to be the Max value of each ProductRef within each SubCatName. My current calcuated column is only giving me the Max value based on the ProdectRef and ignoring the SubCatName. 

 

Current Measure:   

MaxValue = VAR maxvalue = CALCULATE(MAX(robintable[ConvertedPrice]), ALLEXCEPT(robintable, robintable[SubCatName], robintable[ProductRef])) return maxvalue

 

rmauldin_2-1632251601458.png

 

 

 

 

4 REPLIES 4
Greg_Deckler
Community Champion
Community Champion

@Anonymous Try:

New Measure:   

MaxValue =  
  VAR __SubCatName = MAX('robintable'[SubCatName])
  VAR __ProductRef = MAX('robintable'[ProductRef])
RETURN
  MAXX(FILTER(ALLSELECTED('robintable'),[SubCatName]=__SubCatName && [ProductRef] = __ProductRef),[ConvertedPrice])


or if you don't care about the productref:

MaxValue =  
  VAR __SubCatName = MAX('robintable'[SubCatName])
RETURN
  MAXX(FILTER(ALLSELECTED('robintable'),[ProductRef] = __ProductRef),[ConvertedPrice])


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

My original dax of 

MaxValue = VAR maxvalue = CALCULATE(MAX(robintable[ConvertedPrice]), ALLEXCEPT(robintable, robintable[SubCatName], robintable[ProductRef])) return maxvalue

is giving me the max value of each SubCatName and not the max value of the ProdcutRef within each SusCatName

Hi @Anonymous ,

Basically the measure formula written by you should work.

Measure = 
CALCULATE(
    MAX('robintable'[ConvertedPrice]),
    ALLEXCEPT(
        robintable,
        'robintable'[SubCatName],
        robintable[ProductRef]
    )
)

vyingjl_0-1632707107381.png

 

Perhaps you can check whether you have applied any other visual filters or page filters in the report.

 

Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

I tried both of those options, and neither worked. Have any other ideas? I need it to look at each SubCatName and then the ProductRef with in that SubCatName and give me the Max value for all dates

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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