cancel
Showing results for
Did you mean:
Helper V

## how to calculate the number of days between two dates which are in different column?

1 ACCEPTED SOLUTION
Microsoft

Hi @Satish_Kumar,

Please use the following formula to calculate variance update column.

`variance update = IF('NTT 16-17'[Last Payment on]<'NTT 16-17'[DueDate],DATEDIFF('NTT 16-17'[Last Payment on],'NTT 16-17'[DueDate],DAY),1*DATEDIFF('NTT 16-17'[DueDate],'NTT 16-17'[Last Payment on],DAY))`

Thanks,
Lydia Zhang

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
10 REPLIES 10
Helper II

You can use the DATEDIFF function to calculate the difference between the two dates.

Helper V
Frequent Visitor
Helper V

@Thiyags

Frequent Visitor

Helper V

@manderson

its only subtracting the days

if 12/2/2016-17/4/2016

answer is -5 only which is wrong

Helper V

its only subtracting the days

if 12/2/2016-17/4/2016

answer is -5 only which is wrong

Helper V

Microsoft

Hi @Satish_Kumar,

Please use the following formula to calculate variance update column.

`variance update = IF('NTT 16-17'[Last Payment on]<'NTT 16-17'[DueDate],DATEDIFF('NTT 16-17'[Last Payment on],'NTT 16-17'[DueDate],DAY),1*DATEDIFF('NTT 16-17'[DueDate],'NTT 16-17'[Last Payment on],DAY))`

Thanks,
Lydia Zhang

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Helper V

ITS VERY IMPORTANT FOR ME HELP ME AS SOON AS POSSIBLE.