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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
AndreaH
Regular Visitor

Need MAX to recalculate by filter

Hello everyone,

 

I am new to Power BI DAX.😊

I am trying to recalculate MAX efficiency when select HP. (I have a slicer to allow to select mutiple)

But I can only do the MAX calculate by category.

Max Efficiency (Category) =
CALCULATE(
MAX(Combine[Efficiency]),
ALLEXCEPT(Combine,Combine[HP]))

Ex: If I select HP1 and 1.5, MAX efficiency will recalculate to 1 & 1.5's MAX efficiency. Not the MAX by category.

I think I am missing some formate, pleaes help me to solve this issue.

THANK YOU!😄

 

ManufactureModel Number_1HPPolesEfficiency 
AAB180.7850.886
AAC120.840.886
AAD140.8750.886
AAE160.8250.886
AAF1.580.80.886
AAG1.520.8830.886
AAH1.540.8860.886
AAI1.560.8750.886
GGM1140.8650.886
GGM2160.8250.886
GGM3120.8750.886
GGM4180.80.886
GGM51.540.8650.886
GGM61.520.8750.886
GGM71.560.8750.886
GGM81.580.80.886
MM12120.8250.886
MM13140.8550.886
MM14160.8250.886
MM15180.7550.886
MM161.520.8650.886
MM171.540.8650.886
MM181.560.8750.886
      
      
      
ManufactureModel Number_1HPPolesEfficiencyMax
AAB180.7850.875
AAC120.840.875
AAD140.8750.875
AAE160.8250.875
GGM1140.8650.875
GGM2160.8250.875
GGM3120.8750.875
GGM4180.80.875
MM12120.8250.875
MM13140.8550.875
MM14160.8250.875
MM15180.7550.875
1 ACCEPTED SOLUTION
v-rongtiep-msft
Community Support
Community Support

Hi @AndreaH ,

Please refer to my pbix file to see if it helps you.

Create measures.

bot_ =
CALCULATE (
    MAX ( 'Table'[Efficiency] ),
    FILTER ( ALL ( 'Table' ), 'Table'[HP] IN VALUES ( 'Table'[HP] ) )
)
Measure 2 = MAXX(ALLSELECTED('Table'),[bot_])

vpollymsft_0-1653356360887.png

vpollymsft_2-1653356581905.png

vpollymsft_3-1653356595667.png

If I have misunderstood your meaning, please provide more details.

 

Best Regards

Community Support Team _ Polly

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

 

View solution in original post

2 REPLIES 2
AndreaH
Regular Visitor

Hi @v-rongtiep-msft ,

 

This is what I need!! Thank you so much!! I have been working this for few weeks.

Really appreicate.

Andrea

v-rongtiep-msft
Community Support
Community Support

Hi @AndreaH ,

Please refer to my pbix file to see if it helps you.

Create measures.

bot_ =
CALCULATE (
    MAX ( 'Table'[Efficiency] ),
    FILTER ( ALL ( 'Table' ), 'Table'[HP] IN VALUES ( 'Table'[HP] ) )
)
Measure 2 = MAXX(ALLSELECTED('Table'),[bot_])

vpollymsft_0-1653356360887.png

vpollymsft_2-1653356581905.png

vpollymsft_3-1653356595667.png

If I have misunderstood your meaning, please provide more details.

 

Best Regards

Community Support Team _ Polly

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.