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
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...
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 37 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 132 | |
| 88 | |
| 82 | |
| 68 | |
| 64 |