There's an issue with the DATE function supporting 0 day, which should represent the last day of the previous month. Measure = DATE(2017, 1, 0) The expected outcome on this should be December 31...
Nathan
9 years agoFrequent Visitor
You are correct; It does not explictly say 0 is supported. The point I'm trying to expose is DAX Date supports negative numbers, but fails to allow you to go back a single day (which appears to be where 0 comes into play).
DATE(2017, 1, -2) = December 29, 2016
DATE(2017, 1, -1) = December 30, 2016
DATE(2017, 1, 1) = January 1, 2017
Notice how I cannot reach December 31, 2016 using date shifting without using the 0 parameter. That is the bug I'm attempting to report. Without the ability to go back a single day using date shifting, the entire concept feels broken.
Appreciate you taking the time to explain everything to me. I'll continue to use the workaround you provided as it appears to correctly handle date shifting.
Thanks,
Nathan