Forum Discussion
Power Query in Power BI Desktop - Group by
Hello,
I have imported a table from a SQL Server database. I now want to apply a filter to the max(timestamp field) grouping by user and event. How do I do that in Power Query. I amm attempting to get the latest event from an event list for each event and user.
Cheers!
Peter
Anonymous
2 Replies
- Greg_Deckler
Community Champion
Anonymous
- richbenmintz
Resident Rockstar
Hi Anonymous,
I think you will want to create a grouped index and then filter where the index = 1, please see the following blog post that shows how to create a grouped index in power query, https://radacad.com/create-row-number-for-each-group-in-power-bi-using-power-query Another alternative would be to edit your source query to rank the data and return the row you are looking for per group.
Hope this Helps,
Richard
Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!