Forum Discussion
tpoltorak
Helper I
5 years agoNeed help with Running Total
I am struggling to understand how to calculate a running total. I have a columns with customer IDs, week numbers and a number of sessions per week. I would like to calculate a running total of the n...
amitchandak
Super User
5 years agotpoltorak , Try like
RT Sessions = CALCULATE(sum(Query1[Sessions]),filter(all(Query1) ,Query1[concat sessions]<=MAX(Query1[concat sessions]) && Query1[customer] =max(Query1[customer] )))
- tpoltorak5 years ago
Helper I
When you are saying Query1[customer] do you mean customer ID's? Then selecting a max customer ID doesn't make sense in my head. Sorry. 🙂
- amitchandak5 years ago
Super User
tpoltorak , Yes. I was not sure about the column name. I want that work within the same customer ID
- tpoltorak5 years ago
Helper I
So, wouldn't the line
Query1[customerID] =max(Query1[customerID]attempt to select the maximum customer ID?