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

View all the Fabric Data Days sessions on demand. View schedule

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
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
Top Kudoed Authors