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
September Update

Check it Out!

Click here to learn more about the September 2022 updates!

Power BI Show Episode 10 Recap

The Power BI Community Show

Watch the playback when Amit Chandak, a Power BI Super User, demos how to use Field Parameters to make reports more dynamic.

Power BI Dev Camp Session 26

New Date - Check it Out!

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

Health and Life Sciences Power BI User Group

Health and Life Sciences Power BI User Group

Power BI specialists at Microsoft have created a community user group where customers in the provider, payor, pharma, health solutions, and life science industries can collaborate.

Top Solution Authors