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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Khushboo9966
Helper II
Helper II

How to find the max of rows from 5 different columns

I have a table called App with three calculated columns Level1, Level2, Level3, Level4, Level5. 

 

Level1Level2Level3Level4Level5
02305
12000
10040
00305

 

I need to write a calculated column formula to find the max of each row. For example: For row1: Max of 0,2,3,0,5 is 5 and likewise for all rows.

1 ACCEPTED SOLUTION
parry2k
Super User
Super User

@Khushboo9966 here is my recommendation, if it is a DQ, I would recommend adding view at the backend and having this column calculated there (this is a way to go) but if you cannot do that then do this:

 

Column = MAXX ( UNION ( { [Level1] }, { [Level2] }, { [Level3] }, { [Level4] }, { [Level5] } ), [Value] )


Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

6 REPLIES 6
parry2k
Super User
Super User

@Khushboo9966 here is my recommendation, if it is a DQ, I would recommend adding view at the backend and having this column calculated there (this is a way to go) but if you cannot do that then do this:

 

Column = MAXX ( UNION ( { [Level1] }, { [Level2] }, { [Level3] }, { [Level4] }, { [Level5] } ), [Value] )


Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

I was missing the UNION association. Do you mind explaining the formula?

newtodax
Frequent Visitor

Doing this in power query would probably be the easiest way 

newtodax_0-1696972276198.png

 

This is the error I get: The syntax for 'Max' is incorrect. (DAX(List.Max({'App'[Level 1],'App'[Level 2],'App'[Level 3],'App'[Level 4],'App'[Level 5]}))).

parry2k
Super User
Super User

@Khushboo9966 are you looking for a PQ or DAX solution? 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

I am looking for Calculated Column DAX. The data is coming from direct query so PQ is not an option.

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.

Top Solution Authors