Forum Discussion
RHerrera
7 years agoFrequent Visitor
Calculated cumulative column with a complication
Hi, I have been trying to get cumulative values in a calculated column but I couldn't find a way to re-start the cumulative calculation once there is a change from Q1 to Q2 to Q3 (Q=quarter of a day)...
- 7 years ago
try this one
= CALCULATE ( SUM ( Table1[Value] ), FILTER ( Table1, [Q] = EARLIER ( [Q] ) && [Time] <= EARLIER ( [Time] ) ) )
RHerrera
7 years agoFrequent Visitor
Hi, I have been trying to get cumulative values in a calculated column but I couldn't find a way to re-start the cumulative calculation once there is a change from Q1 to Q2 to Q3 (Q=quarter of a day). I need the Cumulative column in Power BI, see below (dummy data):
Q Time Value Cummulative
| 1 | 6:00:00 AM | 387 | 387 |
| 1 | 6:00:00 AM | 141 | 528 |
| 1 | 6:00:00 AM | 499 | 1,027 |
| 1 | 6:00:00 AM | 0 | 1,027 |
| 1 | 6:00:00 AM | 42 | 1,069 |
| 1 | 6:00:00 AM | 182 | 1,251 |
| 1 | 6:05:46 AM | 351 | 1,602 |
| 1 | 6:06:58 AM | 569 | 2,171 |
| 1 | 6:08:48 AM | 78 | 2,249 |
| 1 | 6:09:35 AM | 532 | 2,781 |
| 1 | 6:24:07 AM | 80 | 2,861 |
| 1 | 6:24:33 AM | 461 | 3,322 |
| 1 | 6:25:37 AM | 99 | 3,421 |
| 1 | 6:27:24 AM | 0 | 3,421 |
| 1 | 6:30:42 AM | 243 | 3,664 |
| 2 | 6:31:36 AM | 518 | 518 |
| 2 | 6:43:06 AM | 80 | 598 |
| 2 | 6:43:49 AM | 234 | 832 |
| 2 | 6:48:46 AM | 550 | 1,382 |
| 2 | 7:01:13 AM | 50 | 1,432 |
| 2 | 7:03:29 AM | 224 | 1,656 |
| 2 | 7:07:41 AM | 171 | 1,827 |
| 2 | 7:15:10 AM | 148 | 1,975 |
| 2 | 7:15:43 AM | 0 | 1,975 |
| 2 | 7:17:49 AM | 451 | 2,426 |
| 2 | 7:18:30 AM | 81 | 2,507 |
| 2 | 7:19:40 AM | 113 | 2,620 |
| 2 | 7:21:32 AM | 46 | 2,666 |
| 2 | 7:25:37 AM | 239 | 2,905 |
| 2 | 7:26:48 AM | 220 | 3,125 |
| 3 | 7:26:50 AM | 496 | 496 |
| 3 | 7:26:54 AM | 418 | 914 |
| 3 | 7:35:13 AM | 86 | 1,000 |
| 3 | 7:49:16 AM | 125 | 1,125 |
| 3 | 7:49:27 AM | 42 | 1,167 |
| 3 | 7:54:37 AM | 82 | 1,249 |
| 3 | 7:55:50 AM | 181 | 1,430 |
| 3 | 8:00:50 AM | 344 | 1,774 |
I can't get the fourth column in Power BI.
Need your help!