Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I have a data set that looks like the following:
| Date Time | Label | Attribute | Value | Index |
| 1/1/23 5:00am | A | 1 | 34 | 1 |
| 1/1/23 5:00am | A | 2 | 12 | 2 |
| 1/1/23 5:00am | A | 3 | 89 | 3 |
| 1/1/23 5:05am | B | 1 | 23 | 4 |
| 1/1/23 5:05am | B | 2 | 11 | 5 |
| 1/1/23 5:05am | B | 3 | 90 | 6 |
| 1/1/23 5:10am | C | 1 | 33 | 7 |
| 1/1/23 5:10am | C | 2 | 23 | 8 |
| 1/1/23 5:10am | C | 3 | 99 | 9 |
| 1/2/23 7:00am | A | 1 | 34 | 10 |
| 1/2/23 7:00am | A | 2 | 12 | 11 |
| 1/2/23 7:00am | A | 3 | 89 | 12 |
What I want to do is calculate a moving range for each Attribute by Label. So in my example you can see that if I want to calculate for Lable A, Attribue 3 I can't use the Index -1 formula. I also can't sort just by attribute then add an index column because the Labels will be in the wrong order and vice versa.
I am wondering how I can use the Date Time column to help resolve this, but can't figure it out.
Thanks.
Hi @cbruhn42 ,
You didn't mention how to calculate for the moving range. What is your expected result?
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.