cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

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
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors