Forum Discussion
Limerick
3 years agoFrequent Visitor
SUM dynamic / dependend on date
Hello together, I have a table like this: What I need to do now, is to sum the amount for every row over the past 5 days, like this: So basically, sum everything up, where the date...
- 3 years ago
Hi,
Create an Index column in the Query Editor and write this calculated column formula
Column = CALCULATE(SUM(Data[Amount]),FILTER(Data,Data[Date]>=EARLIER(Data[Date])-4&&Data[Date]<=EARLIER(Data[Date])&&Data[Index]<=EARLIER(Data[Index])))Hope this helps.
Ashish_Mathur
Super User
3 years agoHi,
Create an Index column in the Query Editor and write this calculated column formula
Column = CALCULATE(SUM(Data[Amount]),FILTER(Data,Data[Date]>=EARLIER(Data[Date])-4&&Data[Date]<=EARLIER(Data[Date])&&Data[Index]<=EARLIER(Data[Index])))
Hope this helps.