Forum Discussion
Bcomm_student
5 months agoRegular Visitor
Need all my difference between dates to be positive
I'm doing a university assignment and part of the instructions is to show the time between an order and shipment date. Both dates came with hierarchies so I've made the column Delivery days = Data...
- 5 months ago
Use the full date columns and the DATEDIFF() function:
Delivery days = DATEDIFF ( Data[Order Date], Data[Delivery Date], DAY )If your assignment requires only positive values:
Delivery days = ABS( DATEDIFF ( Data[Order Date], Data[Delivery Date], DAY ) )
Mauro89
5 months agoSuper User
Hi Bcomm_student,
what you can try is to convert the data into integer and use the ABS() function to only get the absolut values.
If you only want positives meaning filtering the negatives out, make use of a filter set to values greater to zero.
Best regards!
PS: If you find this post helpful consider leaving kudos or mark it as solution