Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
Hi there!
Each row in my table (named Documents) represents a document created by a user of my application. Whenever a user edits a document, it creates a new version of the document. Each document has what is called a GroupKey. The GroupKey is the unique identified for each document. Any groupkey can have many versions.
As a results, my table contains each version of every document ever created in the app. I am intersted in reporting on only the latest version of any given document. so, I need to figure out a way to create a new table that ony has the max version number of each GroupKey.
Here is a snapshot of the table I am working with:
I would appreciate any advice on how to acheive this. My instincts are telling me I need to group by the max value of the Version column for every GroupKey, but do not know how to acheive this.
Thank you!
Solved! Go to Solution.
Hi
Create a calculated column like this and this will flag the latest version in each group key and then you can filter on this flag column to get the latest version only.
Flag= IF(CALCULATE(MAX(Table1[Version]),FILTER(Table1,Table1[GroupKey]=EARLIER(Table1[GroupKey])))=Table1[Version],1,0)
Thanks
Raj
Hi
Create a calculated column like this and this will flag the latest version in each group key and then you can filter on this flag column to get the latest version only.
Flag= IF(CALCULATE(MAX(Table1[Version]),FILTER(Table1,Table1[GroupKey]=EARLIER(Table1[GroupKey])))=Table1[Version],1,0)
Thanks
Raj
This solution worked well, thank you!
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 64 | |
| 53 | |
| 42 | |
| 20 | |
| 17 |
| User | Count |
|---|---|
| 121 | |
| 103 | |
| 47 | |
| 30 | |
| 24 |