Forum Discussion
jc173
2 years agoFrequent Visitor
Running total with different column condition
Hi guys i have this data : TIMESTAMP_INIZIO_ARR TIMESTAMP_FINE_ARR INSMAN TURNO value 2024-05-04 05:30:00.000 2024-05-04 06:00:00.000 1 1 926 2024-05-04 06:00:00.000 2024-05-04 06:...
- Anonymous2 years ago
Hi, jc173
First, you need to create an Index, which can be created by selecting AddColumn in PowerQuery.
Apply and close. Then create a calculated column.
Cumulative Sum = VAR CurrentTurno = 'Table'[TURNO] RETURN CALCULATE( SUM('Table'[value]), FILTER( ALL('Table'), 'Table'[Index] <= EARLIER('Table'[Index]) && 'Table'[TURNO] = CurrentTurno ) )Here is my preview:
How to Get Your Question Answered Quickly
Best Regards
Yongkang Hua
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
2 years agoNot applicable
Hi, jc173
First, you need to create an Index, which can be created by selecting AddColumn in PowerQuery.
Apply and close. Then create a calculated column.
Cumulative Sum =
VAR CurrentTurno = 'Table'[TURNO]
RETURN
CALCULATE(
SUM('Table'[value]),
FILTER(
ALL('Table'),
'Table'[Index] <= EARLIER('Table'[Index]) &&
'Table'[TURNO] = CurrentTurno
)
)
Here is my preview:
How to Get Your Question Answered Quickly
Best Regards
Yongkang Hua
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.