Forum Discussion
Time interval
I've looked at it and as Amira pointed out, you can't use CTEs.
Please explain what is wrong with my version. It seems to work for me and you still haven't shown an example where it doesn't work.
Please refer to the 2nd page of my pbix.
See The Excel sheet - it take 4 iterations (Running Total every 15 min) your solution show 6 record per group also 10:26 - 10:12 = 14
- gmsamborn2 years agoSuper User
If you are using 15 minute buckets, why isn’t 10:26 highlighted?
10:12 would be in the '10:00 to 10:15' bucket whereas 10:26 would be in the '10:15 to 10:30' bucket.OR do you mean that the bucket start resets based on something? If you mean a floating 15 minute bucket, the Time dimension's buckets won't help at all.
I need more details
- Oded-Dror2 years agoHelper III
Look at the Excel sheet the interval is reset everytime the running total reach 15 min
Remember 10:12 was the cutting point now we are in 0 againtherefore 10:26 - 10:12 = 14 (we need 1 more to get 15) than 10:32 - 10:26 = 6
6 + 14 = 20 is >= 15 yes so 10:32 is the correct result
In another word is the running total of delta need to reach 15 min and reset again to 0 and start over thats way your windows of 15 min bucket won't produce the expected result it has to be recursive like TSQL - gmsamborn2 years agoSuper User
Sorry. I thought you meant 15 minutes as in a Time dimension.
I'll look at doing it without the time dimension but DAX doesn't support recursion. any use of a CTE is out.
- Oded-Dror2 years agoHelper III
Yes, the Windows function in DAX may help?