Forum Discussion
Kolumam
7 years agoPost Prodigy
Yesterday formula using datetime datatype in DAX
Hi All, I need to compute yesterday with all the DateTime values but when I use the below-calculated column it returns just one value. I need all the date time values from yesterday. Yesterday =...
- 7 years ago
hi, Kolumam
For the data type is datetime, so try this formula:
New Yesterday = IF(DATE(YEAR('DATE'[Date]), MONTH('Date'[Date]), DAY('Date'[Date]))= (DATE(YEAR(NOW()), MONTH(NOW()), DAY(NOW()-1))), 1 , 0)Result:
Best Regards,
Lin
v-lili6-msft
7 years agoCommunity Support
hi, Kolumam
For the data type is datetime, so try this formula:
New Yesterday = IF(DATE(YEAR('DATE'[Date]), MONTH('Date'[Date]), DAY('Date'[Date]))= (DATE(YEAR(NOW()), MONTH(NOW()), DAY(NOW()-1))), 1 , 0)
Result:
Best Regards,
Lin