Forum Discussion
Anonymous
6 years agoNot applicable
DateDiff showing wrong value
Hello - Using the calculated column below, my datediff number if not giving me the correct values. The order below shipped on June 17. The lead for that eventually generated an order was ...
- 6 years ago
Not knowing what the relationship is between your two tables, you could try this expression
Date Diff = VAR __orderdate = MIN ( SalesLifecycle[LeadCreateDate] ) VAR __thisorder = MIN ( SalesLifecycle[Order] ) VAR __shippeddate = CALCULATE ( MIN ( Shipments[Date Shipped] ), ALLSELECTED ( Shipments ), Shipments[Order] = __thisorder ) RETURN DATEDIFF ( __orderdate, __shippeddate, DAY )If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
Greg_Deckler
Community Champion
6 years agoAnonymous - What happens if you just use this:
Datediff = (MAX(Shipments[Date Shipped]) - MIN(SalesLifecycle[LeadCreateDate]) ) * 1.- Anonymous6 years agoNot applicable