Forum Discussion
How to set row criteria for Table.Min
- 8 years ago
Hi, designertechno
switch Table.Min by Table.MinN
see example...
let
Employees = Table.FromRecords(
{[Name="Bill", Level="P1", Salary=100000],
[Name="Barb", Level="P2", Salary=150000],
[Name="Andrew", Level="P3", Salary=85000],
[Name="Nikki", Level="P4", Salary=75000],
[Name="Margo", Level="P5", Salary=45000],
[Name="Jeff", Level="P6", Salary=200000]},type table [
Name = text,
Level = number,
Salary = number
])in
Table.MinN(Employees, "Salary", each [Level] ="P1")
- 8 years ago
Ah, Ive reread your reply from the first time round just now with a little more focus and it's exactly what I needed, thanks.
I missed the "each" in the criteria the first time through and so thought it was something I had already tried."each" provides the row context i was looking for.
Thanks for your patience.UPDATE:
Actually no this doesn't work. I was looking at the wrong record. This just create a Record column on Table B, but every record is linked to "Project A". It ignores the Project of the current row. In the end Ive just gon with an left outer join and pared back the unneccesary columns.
Try this is
or
or
send an example of data you are using
Ah, Ive reread your reply from the first time round just now with a little more focus and it's exactly what I needed, thanks.
I missed the "each" in the criteria the first time through and so thought it was something I had already tried.
"each" provides the row context i was looking for.
Thanks for your patience.
UPDATE:
Actually no this doesn't work. I was looking at the wrong record. This just create a Record column on Table B, but every record is linked to "Project A". It ignores the Project of the current row. In the end Ive just gon with an left outer join and pared back the unneccesary columns.