Forum Discussion
eWise
Helper II
5 years agoIF Statement with blank dates
Hi all, Can someone help me with this, Am trying to create an adjusted date based on the current date and time where when the time is past 1 pm, the adjusted date is the following day at 7 am. It ...
- 5 years ago
eWise Right, DAX base reference date is midnight, 12/30/1899. Why? No idea, just is. So, BLANK() = 0 = 12/30/1899 00:00:00.
So, makes total sense what is going on. Try this:
AdjustedDeliveryTime = IF(ISBLANK('Order'[delivered],BLANK(),IF('Order'[PickedUpTime] > TIME(13,00,00), INT('Order'[delivered]) + 1 + TIME(7,0,0), 'Order'[delivered]))If you hate nested IF statements, use SWITCH(TRUE()...)
Greg_Deckler
Community Champion
5 years agoeWise Right, DAX base reference date is midnight, 12/30/1899. Why? No idea, just is. So, BLANK() = 0 = 12/30/1899 00:00:00.
So, makes total sense what is going on. Try this:
AdjustedDeliveryTime =
IF(ISBLANK('Order'[delivered],BLANK(),IF('Order'[PickedUpTime] > TIME(13,00,00), INT('Order'[delivered]) + 1 + TIME(7,0,0), 'Order'[delivered]))
If you hate nested IF statements, use SWITCH(TRUE()...)
eWise
Helper II
5 years agoThanks Greg_Deckler . That worked.