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
I'm trying to get the time from one row to the next to determine how much time has elapsed from each entry.
I'm currently using this DAX statement:
Moving Range =
VAR a =
CALCULATE (
FIRSTNONBLANK ( Query1[Time], 1 ),
FILTER(
'Query1',
'Query1'[Test]= EARLIER('Query1'[Test] - 1 ))
)
RETURN
IF ( a = BLANK (), BLANK(), DATEDIFF( a , Query1[Time],MINUTE))
But it gives me an error when I use it. I've posted some sample data to assist with this.
Same Day: is an index that indicates to me that the entry is the same day.
Test: is the index of the events that are on the same day.
Solved! Go to Solution.
Hi @Anonymous,
You can add an index column in Query Editor. Then create a calculated column like below:
Best Regards,
Qiuyun Yu
Hi @Anonymous,
You can add an index column in Query Editor. Then create a calculated column like below:
Best Regards,
Qiuyun Yu
First question : what's the error?
Doesn't the offending text get highlighted in the formula?
It looks like there's a bracket out of place in the EARLIER clause
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 59 | |
| 43 | |
| 42 | |
| 23 | |
| 17 |
| User | Count |
|---|---|
| 190 | |
| 122 | |
| 96 | |
| 66 | |
| 47 |