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

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now

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
Fabric Data Days is here Carousel

Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.