Forum Discussion
svishwanathan
8 years agoHelper III
Days between dates column not correctly computing
Hello I am running two columns which cacluate days between dates and both are throwing incorrect results Time to Close RFIs = IF(ISBLANK(RFIs[ANSWERED_DATE]),BLANK(),(RFIs[ANSWERED_DATE]-RFIs[...
- 8 years ago
Recreated your table and created two different calculated columns with the same results
datediff = IF ( DATEDIFF ( 'Table2'[RequiredDate], Table2[AnswerDate], DAY ) > 0, -1 * ( DATEDIFF ( 'Table2'[RequiredDate], Table2[AnswerDate], DAY ) ), DATEDIFF ( 'Table2'[RequiredDate], Table2[AnswerDate], DAY ) )where
- 'Table2' should be replaced with your table and
- RequiredDate is PMSCRFI_ANSWERED_DATE and
- AnswerDate is PMSCRFI_REQUIRED_DATE
Another Calculated column
datediff 2 = IF ( Table2[RequiredDate] < Table2[AnswerDate], -1 * DATEDIFF ( 'Table2'[RequiredDate], Table2[AnswerDate], DAY ), DATEDIFF ( 'Table2'[RequiredDate], Table2[AnswerDate], DAY ) )These give the same result
svishwanathan
8 years agoHelper III
I tried but doesnt help
Time to Resolve = SWITCH(TRUE(),RFIs[PMSCRFI_REQUIRED_DATE]<RFIs[PMSCRFI_ANSWERED_DATE],-1*DATEDIFF(RFIs[PMSCRFI_REQUIRED_DATE],RFIs[PMSCRFI_ANSWERED_DATE],DAY),RFIs[PMSCRFI_REQUIRED_DATE]>RFIs[PMSCRFI_ANSWERED_DATE],DATEDIFF(RFIs[PMSCRFI_ANSWERED_DATE],RFIs[PMSCRFI_REQUIRED_DATE],DAY),0)
Anonymous
8 years agoNot applicable
Can you share some sample data, what result you are getting and what result you are expecting?