Forum Discussion
Group by with where clause Power Query M
Hey, assume i have some table like this:
I want to get the row (or just the "interessent" like with group by based on the "interessent" column) with the highest date where "Kategorie" is not empty.
I started with the group function to get the highest date:
#"LastFilledCategory" = Table.Group(#"FilteredRows", {"Interessent"}, {{"IdOfGroupedBy", each List.Max([Datum]), type nullable datetime}})
But how i can add something like a "where" clause?
Thanks for any hint 🙂
2 Replies
- Idrissshatila
Super User
Hello PhilippRien ,
check this video out https://youtu.be/jLpgt-wptH4
If I answered your question, please mark my post as solution, Appreciate your Kudos 👍
- MBernalBIFrequent Visitor
Hi PhilippRien ,
I think you should filter the category column and only see the records where "Kategorie" is not blank.
Once the data is filtered, you carry out the grouping that you have commented previously. If I'm not mistaken, you would get the result you are looking for.