Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi,
I have a table with the following schema
ID | Capacity | Load | Hour |
1 | 900 | 1100 | 0 |
1 | 900 | 1200 | 1 |
1 | 900 | 1200 | 2 |
1 | 900 | 300 | 3 |
1 | 900 | 200 | 4 |
1 | 900 | 100 | 22 |
1 | 900 | 1000 | 23 |
I would like to have another column which displays the streak count of each ID where Load>Capacity. The streak is based on Hour key. For the above example, my desired output will be this
ID | Capacity | Load | Hour | Max Consecutive Over Loaded Hours |
1 | 900 | 1100 | 0 | 3 |
1 | 900 | 1200 | 1 | 3 |
1 | 900 | 1200 | 2 | 3 |
1 | 900 | 300 | 3 | 3 |
1 | 900 | 200 | 4 | 3 |
1 | 900 | 100 | 22 | 3 |
1 | 900 | 1000 | 23 | 3 |
Thank you in advance.
Solved! Go to Solution.
Ended up adapting the approach discussed here
https://community.powerbi.com/t5/Desktop/Build-measure-or-column-to-show-a-streak-by-consecutive-dat...
Ended up adapting the approach discussed here
https://community.powerbi.com/t5/Desktop/Build-measure-or-column-to-show-a-streak-by-consecutive-dat...
User | Count |
---|---|
140 | |
113 | |
104 | |
77 | |
65 |
User | Count |
---|---|
135 | |
117 | |
101 | |
71 | |
61 |