cancel
Showing results for 
Search instead for 
Did you mean: 
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-polly-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-polly-msft ,

 

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

Really appreicate.

Andrea

v-polly-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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power BI Dev Camp Session 23 768x460.jpg

Check it Out!

Mark your calendars and join us on Thursday, June 30 at 11a PDT for a great session with Ted Pattison!

Top Solution Authors
Top Kudoed Authors