Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
97 | |
84 | |
67 | |
60 |
User | Count |
---|---|
150 | |
120 | |
99 | |
87 | |
68 |