Forum Discussion

tod's avatar
tod
Frequent Visitor
5 years ago
Solved

M language - Add custom column using filter in Power BI

Hi, I'm looking for an M language code I can use in PBI Power Query to add a custom column that looks up the max value in one column based on a filter in another.  Below is an example of the data se...
  • Fowmy's avatar
    5 years ago

    tod 

    Are you trying to get the largest value from column 1 where the category is "A" in Column 2?
    Add the following column.

    List.Max( Table.SelectRows(#"Changed Type", each [Category]="A")[YYYYMM] )