Forum Discussion
OLoughanD
7 years agoHelper I
Running Total
Want to get a running total for each date by SalesReps, ordering by date (ie. Month column) ascending. I have highlighted in red what I am trying to achieve.
- 7 years ago
RunningTote = VAR _SPerson = TableX[sPerson] VAR _Day = TableX[day] RETURN CALCULATE(SUM([dTarget]), FILTER(TableX, TableX[day] <= _Day && TableX[sPerson] = _SPerson))Create a calculated column, swap in your table and column names.
Quick Tip : For better help, post sample data rather than a picture of the data
HotChilli
7 years agoCommunity Champion
RunningTote = VAR _SPerson = TableX[sPerson]
VAR _Day = TableX[day]
RETURN
CALCULATE(SUM([dTarget]),
FILTER(TableX,
TableX[day] <= _Day &&
TableX[sPerson] = _SPerson))Create a calculated column, swap in your table and column names.
Quick Tip : For better help, post sample data rather than a picture of the data
OLoughanD
7 years agoHelper I
HotChilliThank you very much. This worked perfectly. I added a column to my table and based on your proposed solution my final code was:
RunningTote = VAR _SPerson = Target[SalesPerson]
VAR _Day = Target[Date]
RETURN
CALCULATE(SUM([DateTarget]),
FILTER(Target,
Target[Date] <= _Day &&
Target[SalesPerson] = _SPerson))