This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
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 - Higher order
In this case, it's not to look for the biggest of all and give only one result, it's to apply the criterion for each type of value of the column "ROW"
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
Proud to be a Datanaut!
In this case, it's not to look for the biggest of all and give only one result, it's to apply the criterion for each type of value of the column "ROW"
Hi @Anonymous ,
This doesn't make sense to me. Your example output only shows one result.
Can you provide an example of your ACTUAL required output please?
Pete
Proud to be a Datanaut!
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.