Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
I have a log table like the white one below.
I would like to add a blue column which will indicate what was changed in previous row (previous LogId for each EntityID).
What is the easiest way to do this in PQ?
Or using Dax like this :
Changed = VAR CurrentRow = MIN(Table[LogId]) RETURN CALCULATE(MIN(Table[LogId]), Table[EntityID] = EARLIER(Table[EntityID]), Table[LogId] < CurrentRow)
Create a custom column: Right-click on the log table in the Power Query Editor and select "New Source" > "Blank Query". In the new query, go to "Add Column" > "Custom Column", enter a name for the new column, and enter the following formula:
User | Count |
---|---|
81 | |
76 | |
62 | |
60 | |
48 |
User | Count |
---|---|
109 | |
95 | |
86 | |
79 | |
61 |