Forum Discussion
KH11NDR
8 years agoHelper IV
Running total, by Project ID column
Hi Guys
I Need the running totals each month in a column for the Days column grouped by Project ID.
Thanks Guys
| Project ID | Days | Date | Running Total Days |
| AA | 16 | 01/01/2018 | 16 |
| AA | 20 | 01/02/2018 | 36 |
| AA | 20 | 01/03/2018 | 56 |
| AA | 20 | 01/04/2018 | 76 |
| BB | 1 | 01/01/2018 | 1 |
| BB | 1 | 01/02/2018 | 2 |
| BB | 6 | 01/03/2018 | 8 |
| BB | 7 | 01/04/2018 | 15 |
they do work for me - is the Table[Date] of data type Date? Other than that I cannot think of other reason for it not to work
10 Replies
- Zubair_MuhammadCommunity Champion
Column = CALCULATE ( SUM ( [Days] ), FILTER ( ALLEXCEPT ( Table1, Table1[Project ID] ), [Date] <= EARLIER ( [Date] ) ) )- KH11NDRHelper IV
No that never worked, That's what I tried myself first.
- StachuCommunity Champion
syntax for calculated column
Running Total Days = VAR Project = 'Table'[Project ID] VAR CurrentDate = 'Table'[Date] RETURN CALCULATE(SUM('Table'[Days]),FILTER('Table','Table'[Project ID]=Project &&'Table'[Date]<=CurrentDate))syntax for a measure - summary for a project gives the sum for the latest date for that project
Running Total Days Measure = VAR Project = SELECTEDVALUE('Table'[Project ID]) VAR CurrentDate = MAX('Table'[Date]) RETURN CALCULATE(SUM('Table'[Days]),'Table'[Project ID]=Project,'Table'[Date]<=CurrentDate)