Forum Discussion
GJUDGE
4 years agoHelper II
Help with DateDiff
Probably a straightforward one for most, but how to do I write a measure to caluclate the movement in days of each construction project from one month to the next? So for example, the movement in con...
Anonymous
4 years agoNot applicable
Hi GJUDGE ,
I have added a row to simply reproduce data as you said your actual data contains many months data.
My first measure returns the date diff for each changed .
Below will return the diff between the latest two date:
Measure 2 =
var _last=CALCULATE(MAX('Table'[Construction Start Date]),ALLEXCEPT('Table','Table'[Project]))
var _pre= MAXX(FILTER(ALL('Table'),'Table'[Project]=MAX('Table'[Project]) && [Construction Start Date]<_last),[Construction Start Date])
return DATEDIFF(_pre,_last,DAY)
If it is still not your expected,please show me what you want .
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.