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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi,
I am really struggling with some DAX formula's to calculate the difference in minutes between each of the previous rows.
For example, This tabke are checks which have to be completed every 60 minutes. I am trying to calculate how many minutes are between each. Then how many of those of checks lapse the 60 minute rule.
Any help on this would be appreciated!
Solved! Go to Solution.
Hi @Todd23 ,
I've added the calculated column like below to obtain the previous test time.
Then, I subtracted the previous test time from the current test time to get the time elapsed since the last test:
For this exercise, I combined the date and time columns in order to deal with midnight testing scenarios (if it ever happens), even though the best practice is to separate out the date and time fields for reduced cardinarity.
I've also added a field to show which test exceeded 1 hour from the previous test.
I attach the pbix file in the link below:
Hi @Todd23 ,
I've added the calculated column like below to obtain the previous test time.
Then, I subtracted the previous test time from the current test time to get the time elapsed since the last test:
For this exercise, I combined the date and time columns in order to deal with midnight testing scenarios (if it ever happens), even though the best practice is to separate out the date and time fields for reduced cardinarity.
I've also added a field to show which test exceeded 1 hour from the previous test.
I attach the pbix file in the link below:
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 16 | |
| 7 | |
| 4 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 25 | |
| 13 | |
| 12 | |
| 10 | |
| 6 |