Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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...
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
94 | |
81 | |
66 | |
58 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |