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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
carenel
Frequent Visitor

Maximun value of several columns

Hello Community.

 

I would like to learn how to create a new column with the maximum value of several columns. is there any formula? because IF I use variables and IF linked, if I have to compare too many columns is a hell. 

Thank you in advance

 

Col ACol BCol CCol D Result_max
0,910,080,830,21 0,91
0,370,310,310,74 0,74
0,400,010,030,38 0,40
0,310,880,200,62 0,88

 

1 ACCEPTED SOLUTION
mahoneypat
Microsoft Employee
Microsoft Employee

I would do it in the query too, but, if you can't, here is how to do it in a DAX column.

 

MaxCol = MAXX({Table[ColA], Table[ColB], Table[ColC], Table[ColD]}, [Value]) 

 

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


View solution in original post

4 REPLIES 4
mahoneypat
Microsoft Employee
Microsoft Employee

I would do it in the query too, but, if you can't, here is how to do it in a DAX column.

 

MaxCol = MAXX({Table[ColA], Table[ColB], Table[ColC], Table[ColD]}, [Value]) 

 

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Many thanks, very elegant and simple solution.

themistoklis
Community Champion
Community Champion

@carenel 

 

You can do this through Power Query.

 

Go to Power Query

Select the relevant columns

From Menu on top Go to Add Column --> Click Statistics Button --> Select Max

 

The function used is List.Max

thank you but these columns are calculated and do not show in power query

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