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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors
Top Kudoed Authors