Forum Discussion
Anonymous
4 years agoNot applicable
Resolution the Problematic of Table
I need to calculate within this table the "winners" of the line based on three criteria: 1 - Highest total number of days (if they are equal) 2 - Larger date (if they are still the same) 3 - Highe...
BA_Pete
4 years agoSuper User
Hi Anonymous ,
You can do this by performing three row selections (filters) in Power Query:
firstFilter =
Table.SelectRows(previousStep, each [Total de Dias] = List.Max(previousStep[Total de Dias]))
secondFilter =
Table.SelectRows(firstFilter, each [Dia Mais Recente] = List.Max(firstFilter[Dia Mais Recente]))
thirdFilter =
Table.SelectRows(secondFilter, each [Maior Ordem] = List.Max(secondFilter[Maior Ordem]))
You may be able to roll this into a single step but this lays out the principle most clearly.
Pete