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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
lcfaria
Helper II
Helper II

How to get max value from different columns

Hi everyone,

 

I have a question regarding m language.

 

I have this table:

lcfaria_2-1676713583160.png

 

I need to find the max number of records regarding those 3 columns (Person, Unit and Location), so what I did was get the maximum number of records, using the function below for each column:

lcfaria_1-1676713491646.png

Then, I got the following result:

lcfaria_3-1676713785705.png

 

Now, I need to get the maximum number of these 3 columns as a scalar value. In the example above, the expected number would be 5.

 

I tried the formula below, but of course I need to look at all columns instead of just the Unit column:

lcfaria_5-1676714147935.png

 

Attaching the file, in case that helps with anything: https://1drv.ms/u/s!At5JlMR_naI1gf8GlIugbtzu09Vcfw?e=EqP1Ho

 

I appreciate your help on this topic. Thanks!

2 ACCEPTED SOLUTIONS
serpiva64
Solution Sage
Solution Sage

Hi,

to obtain this (in my case 9 is maximum)

serpiva64_0-1676716976982.png

You need to add a custom column

List.Max({[Column1], [Column2], [Column3]})

serpiva64_1-1676717038683.png

then List.MAx on your added column

If this post is useful to help you to solve your issue, consider giving the post a thumbs up and accepting it as a solution!

 

 

 

 

View solution in original post

Anonymous
Not applicable

@serpiva64 already gave the answer to the question. 
Just adding the photo to achieve the same requirement.

VishalJhaveri_0-1676720240317.png


Thank you.

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

@serpiva64 already gave the answer to the question. 
Just adding the photo to achieve the same requirement.

VishalJhaveri_0-1676720240317.png


Thank you.

Hi @Anonymous thanks for complementing the answer!!!!

serpiva64
Solution Sage
Solution Sage

Hi,

to obtain this (in my case 9 is maximum)

serpiva64_0-1676716976982.png

You need to add a custom column

List.Max({[Column1], [Column2], [Column3]})

serpiva64_1-1676717038683.png

then List.MAx on your added column

If this post is useful to help you to solve your issue, consider giving the post a thumbs up and accepting it as a solution!

 

 

 

 

Thank you for your help @serpiva64 !!!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.