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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
dabrooze
New Member

Show MAX over all rows, but keep filter on page

Hi,

I have a table with companie names and their value.

CompanyValue
A10
B50
C30
D20
E10
F5
G60

 

 

I have a page with a report that's showing the max value for each of these companies
CALCULATE ( MAX (  [value] ) , ALL ( [ company] ) )

 

CompanyValueMax value
A1060
B5060
C3060
D2060
E1060
F560
G6060

 

On the page itself is a filter on companies. If I filter out company's G and B, I now still land on a max value of 60.

 

CompanyValueMax value
A1060
C3060
D2060
E1060
F560

 

I'm looking for a DAX formula that's finding the MAX value of the companies that I filtered on the page itself. Based on these companies the output should then return 30.

 

CompanyValueMax value
A1030
C3030
D2030
E1030
F530

 

How to achieve this?

1 ACCEPTED SOLUTION
dabrooze
New Member

Thanks @Uzi2019 and @Kedar_Pande ,

Have used your inputs to land on the following measure that worked for me:

 

CALCULATE (
 MAX ( [Value] ) ,  
     ALLSELECTED ( [Company ) ,
     ALLEXCEPT( [companies table] , [Company] )
)

 

Thanks!

View solution in original post

3 REPLIES 3
dabrooze
New Member

Thanks @Uzi2019 and @Kedar_Pande ,

Have used your inputs to land on the following measure that worked for me:

 

CALCULATE (
 MAX ( [Value] ) ,  
     ALLSELECTED ( [Company ) ,
     ALLEXCEPT( [companies table] , [Company] )
)

 

Thanks!

Uzi2019
Super User
Super User

Hi @dabrooze 

 

Try below dax measure

 

max company = CALCULATE(MAX(company[Value]),ALLSELECTED(company[Company]))
 

Uzi2019_0-1729149756019.png

 

I hope I answered your question!

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

DAX Formula:

Max_Filtered_Value = MAX(Table[Value])

This measure calculates the maximum value based on the current filter context applied to the visual. When you filter out companies (like G and B), the max value will only consider the remaining visible companies.

 

💌 If this helped, a Kudos 👍 or Solution mark would be great! 🎉
Cheers,
Kedar
Connect on LinkedIn

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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