Forum Discussion
LasseLJørgensen
2 years agoRegular Visitor
Running total using datediff in a measure
I need a dynamic measure that can make a running total summing the amount of days between two dates per employee. I want the measure to be able to run in 12 months 'windows'. Please regard I am not ...
- 2 years ago
Anonymous
Hi, thx for the advice, but I couldn't get your idea to work.
I've worked on it some more and got it to work with this:Measure =VAR max_dato = MAX('Data'[Date paid])VAR min_dato = FIRSTDATE(SAMEPERIODLASTYEAR('Data'[Date paid]))RETURNCALCULATE(SUM('Data'[DIFF]),FILTER(ALL('Data'),'Data'[Date paid] <= max_dato&& 'Data'[Date incurred] >= min_dato))
LasseLJørgensen
2 years agoRegular Visitor
Hi Dangar332
That gives the same result. What I'm expectning is:
26-01-2014 = 5
14-02-2014 = 15
16-04-2014 = 33
and so on.