Forum Discussion
Running total, by Project ID column
- 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
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)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".
- Stachu8 years agoCommunity Champion
Is ReportingDate coming from the same table, or from other table connected via join?
If the latter is the case then all Table[Date] syntax should be replaced with TableName[ReportingDate]
- KH11NDR8 years agoHelper IV
I've got it working, I've got a further filter, which divides the data by three, If I filter on it manually and divide your column y 3, I get exactly what I'm looking for.
Is there obviously a way to filter on two columns?
- Stachu8 years agoCommunity Champion
I don't get the question.
in the syntax I posted there is filter on Table[Project ID] & Table[Date], so 2 columns are filtered with AND operator, you can add more columns in the same manner