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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply

How to find the MIN of each column value in Poweru Query M

Hello Everyone

 

I have a table

NAMESCORE1SCORE2SCOR3
JHON548
ANNE668
MARIE758

 

There are a lot of other column but essentially I just want to get the min Score per row, first row 4, second 6 (what about tie), third 5 in a new column

 

I've found MIN for both List.Min and Table.Min but I'm not able to get the minimum value per row.

 

Could you suggest me how I could try to get this? 

 

Thanks so much

1 ACCEPTED SOLUTION
HotChilli
Super User
Super User

A column like 

List.Min({[SCORE1], [SCORE2], [SCORE3]})

View solution in original post

4 REPLIES 4
HotChilli
Super User
Super User

you need an 'each' before List.Min

Lol, and now I can now see how much easy is, 

Here is the syntax = Table.AddColumn(#"Table", "Custom", each List.Min({ [Scor1], [Score2], [Score3] }))

Thank you very much!!

HotChilli
Super User
Super User

A column like 

List.Min({[SCORE1], [SCORE2], [SCORE3]})

I got error, if wanted a new column, I typed

= Table.AddColumn(#"Table", "Custom", List.Min({ [Scor1], [Score2], [Score3] }))

is it right?

This gives me error

Expression.Error: There is an unknown identifier. Did you use the [field] shorthand for a _[field] outside of an 'each' expression?

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.