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
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?
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 |
|---|---|
| 48 | |
| 40 | |
| 38 | |
| 20 | |
| 17 |
| User | Count |
|---|---|
| 68 | |
| 65 | |
| 30 | |
| 26 | |
| 25 |