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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

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
Anonymous
Not applicable

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

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

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

FrankAT
Community Champion
Community Champion

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.