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
baronraghu
Helper III
Helper III

Max value of a filtered Table

Hi All,

I am trying to find out the maximum value of the column highlighted in Red

baronraghu_0-1638786703657.png

The highlighted Red column is A calculated Measure and the columns in Blue is filtered. 

I used MAXX& ALL EXCEPT. However it is giving maximum value of an unfiltered table. Plz help

 

1 ACCEPTED SOLUTION
v-angzheng-msft
Community Support
Community Support

Hi, @baronraghu 

Try to replace ALL EXCEPT with FILTER+ALL+MAX  in your measures.

like:

a =
CALCULATE ( SUM ( [value] ), ALLEXCEPT ( table, 'table'[name], 'table'[age] ) )
b =
CALCULATE (SUM ( [value] ),
FILTER (ALL ( table ),'table'[name] = MAX ( 'table'[name] )&& 'table'[age] = MAX ('table'[age] ))
)

 

If it doesn't work, could you please consdier sharing more details about it and posting expected result so it is clear on what needs to be implemented?  And It would be great if there is a sample file without any sesentive information here. It makes it easier to give you a solution.

 

 

 

Best Regards,
Community Support Team _ Zeon Zheng


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

3 REPLIES 3
v-angzheng-msft
Community Support
Community Support

Hi, @baronraghu 

Try to replace ALL EXCEPT with FILTER+ALL+MAX  in your measures.

like:

a =
CALCULATE ( SUM ( [value] ), ALLEXCEPT ( table, 'table'[name], 'table'[age] ) )
b =
CALCULATE (SUM ( [value] ),
FILTER (ALL ( table ),'table'[name] = MAX ( 'table'[name] )&& 'table'[age] = MAX ('table'[age] ))
)

 

If it doesn't work, could you please consdier sharing more details about it and posting expected result so it is clear on what needs to be implemented?  And It would be great if there is a sample file without any sesentive information here. It makes it easier to give you a solution.

 

 

 

Best Regards,
Community Support Team _ Zeon Zheng


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

baronraghu
Helper III
Helper III

 Hi, 

its not working , Please note there are two columns highlighted in  blue.

mh2587
Super User
Super User

Measure =
MAXX ( ALLSELECTED ( 'Table'[Blue Col] ), [Red Col] )

Did I answer your question? If so, please mark my post as a solution!


Proud to be a Super User!




LinkedIn Icon
Muhammad Hasnain



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.