cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Syndicate_Admin
Administrator
Administrator

Show maximum value in an array

Hello, I hope you are well

I need to create a measure that allows you to display the maximum value of a column. The funny thing is that this value can vary depending on the filters used.

categorynumberMaximum
A0,545983470,94512971
B0,028680990,94512971
C0,54452680,94512971
D0,198681940,94512971
E0,096332490,94512971
F0,945129710,94512971
G0,023016430,94512971
H0,619615570,94512971

I've tried MAXA and MAXX and the formula doesn't work for me 😞

Thanks a lot!

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

Hi @Syndicate_Admin ,

 

You could use ALL(), ALLSELECTED() and ALLEXCEPT() function to get different result.

ALL() function could be used to calculate the max value for entire table.

https://docs.microsoft.com/en-us/dax/all-function-dax 

ALLSELECTED() function could be used to calculate the max value for filtered table.

https://docs.microsoft.com/en-us/dax/allselected-function-dax 

ALLEXCEPT() function could be used to calculated the max value for groups.

https://docs.microsoft.com/en-us/dax/allselected-function-dax 

 

Best Regards,

Jay

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.

View solution in original post

2 REPLIES 2
v-jayw-msft
Community Support
Community Support

Hi @Syndicate_Admin ,

 

You could use ALL(), ALLSELECTED() and ALLEXCEPT() function to get different result.

ALL() function could be used to calculate the max value for entire table.

https://docs.microsoft.com/en-us/dax/all-function-dax 

ALLSELECTED() function could be used to calculate the max value for filtered table.

https://docs.microsoft.com/en-us/dax/allselected-function-dax 

ALLEXCEPT() function could be used to calculated the max value for groups.

https://docs.microsoft.com/en-us/dax/allselected-function-dax 

 

Best Regards,

Jay

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.

View solution in original post

FrankAT
Super User II
Super User II

Hi @Syndicate_Admin ,

you can do it like this:

 

09-06-_2021_00-26-44.png

 

Max of selected values = 
    CALCULATE ( 
        MAX ( 'Table'[number] ) ,
        ALLSELECTED ( 'Table'[number] )
    )

With kind regards from the town where the legend of the 'Pied Piper of Hamelin' is at home
FrankAT (Proud to be a Datanaut)

Helpful resources

Announcements
PBI_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Get Ready for Power BI Dev Camp

Microsoft named a Leader in The Forrester Wave

Microsoft received the highest score of any vendor in both the strategy and current offering categories.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Solution Authors