Reply
Super Contributor
Posts: 5,376
Registered: ‎07-11-2015

Days Between Dates with Negatives

Have used this one countless times. The problem is that DAYSBETWEEN DAX function does not allow returning negative values, so instead use:

 

DaysBetween = ROUNDUP(1.*[Date]-[OtherDate],0),
Highlighted
Super Contributor
Posts: 1,664
Registered: ‎11-29-2015

Re: Days Between Dates with Negatives

Here is an ugly alternative Smiley Happy

 

Column = IFERROR(
DATEDIFF(Dates[Date],Dates[OtherDate],DAY),
-DATEDIFF(Dates[OtherDate],Dates[Date],DAY )
)