Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by watching the DP-600 session on-demand now through April 28th.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
Hello!
I need to run a specific logic in one of my queries.
I have a column coming from the database: "Last Updated On" which is the last time the users sent the data modifications to the database.
And then I have a column "Activity Start Date", with date and time of when the activity will start.
The logic is that the activity start date should be classified as "Include" only if:
1) the Activity Start Date is greater than the corresponding "Last Updated On" (this is the easy part ;-)) AND
2) the Activity start date is smaller than the next "Last Updated On" in chronological order.
I have tried to summarize below:
Could you please help me to understand how to reach the second condition?
Thanks!!!!
Kind regards
Valeria
Solved! Go to Solution.
I think I figured this one out... I added a ranking column on the table on the Last Updated On Column (Table.AddRankColumn(#"Filtered Rows1","Rank",{"LAST_UPDATED_ON", Order.Ascending},[RankKind = RankKind.Dense])
Then, I duplicated the query, grouped by "Last Updated On" date and "Rank", and then added a custom column "Rank -1". I then merged this query with the original one on the Rank/Rank-1 column to get the next available "Last Updated On" date, from here it's easy.
Please chime in if you have a better solution!
Thanks
Kind regards
Valeria
I think I figured this one out... I added a ranking column on the table on the Last Updated On Column (Table.AddRankColumn(#"Filtered Rows1","Rank",{"LAST_UPDATED_ON", Order.Ascending},[RankKind = RankKind.Dense])
Then, I duplicated the query, grouped by "Last Updated On" date and "Rank", and then added a custom column "Rank -1". I then merged this query with the original one on the Rank/Rank-1 column to get the next available "Last Updated On" date, from here it's easy.
Please chime in if you have a better solution!
Thanks
Kind regards
Valeria
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 5 | |
| 5 | |
| 4 |