Forum Discussion
Anonymous
8 years agoNot applicable
calculated date difference from different months giving negative value
Trying to create a calculated column that takes the difference between 2 different dates. However I'm running into an issue where the formula is not recognizing the values that are from 2 different ...
- 8 years ago
Hi Anonymous,
It seems that you may modify your formula like below.
Time = IF ( OR ( ISBLANK ( 'Table1'[DoneDate].[Day] ), ISBLANK ( 'Table1'[ToDoDate].[Day] ) ), 0, DATEDIFF ( 'Table1'[DoneDate], 'Table1'[ToDoDate], DAY ) )By my test with Power BI Desktop Version: 2.61.5192.541 64-bit (August 2018), everyhing works as expected.
If you still need help, please share your sample data and your desired output.
Best Regards,
Cherry
v-piga-msft
Resident Rockstar
8 years agoHi Anonymous,
It seems that you may modify your formula like below.
Time =
IF (
OR (
ISBLANK ( 'Table1'[DoneDate].[Day] ),
ISBLANK ( 'Table1'[ToDoDate].[Day] )
),
0,
DATEDIFF ( 'Table1'[DoneDate], 'Table1'[ToDoDate], DAY )
)
By my test with Power BI Desktop Version: 2.61.5192.541 64-bit (August 2018), everyhing works as expected.
If you still need help, please share your sample data and your desired output.
Best Regards,
Cherry
Anonymous
8 years agoNot applicable
Thank you! I didn't realize I was just looking at the [Day] value while doing my calculation. Works great!