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 ,
Please try:
Measure =
var _pre=MAXX(FILTER(ALL('Table'),[Project]=MAX('Table'[Project]) && [Construction Start Date]<MAX('Table'[Construction Start Date])),[Construction Start Date])
return DATEDIFF(_pre,MAX('Table'[Construction Start Date]),DAY)
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.
GJUDGE
4 years agoHelper II
Anonymous This almost gets me there! The only other complexity is that my actual data contains many months data. Using your measure it appears to be comparing the last and first dates rather than the last two months. is there any way to modify your measure?