Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Bug in Date function (when Day=0)

I posted this the below link in the Help forum, and believe there is a bug in the DAX Date function in Power BI -- it is returning an error when the Day argument is zero.   The Excel version of the function works as expected (with Day=0 returning the last day of the previous month).   Entering Month=0 works in Power BI (returning December of the previous year), and negative values for the Day argument also work as expected.   My sample DAX formula below works for all days UNLESS it happens to be the 14th day of the month -- behaviour that certainly doesn't seem right.

https://community.powerbi.com/t5/Desktop/DATE-function-with-Day-0/m-p/1294869
Calculated column example:

IsDateWithinLast14Days = if([Date]>=date(year(today()),month(today()),day(today())-14),true(),false())
Status: New
Comments
v-chuncz-msft
Community Support

@Anonymous 

 

Check the post below and create a support ticket for assistance if necessary.

https://community.powerbi.com/t5/Issues/Bug-Date-Function-Issue/idi-p/230233