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 ...
- 8 years ago
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
Stachu
8 years agoCommunity 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)- KH11NDR8 years agoHelper IV
Stachu.
None of those worked, In the measure, it gives me the same days as they are in each month, no rolling totals.
- Stachu8 years agoCommunity Champion
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
- KH11NDR8 years agoHelper IV
Column Date is Date Type
Ok, Maybe because in my real data model it's grouped by Product ID and another column called "ReportingDate".