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.

Date function does not with 0 Day. Work with both Positive and Negative numbers

I  created the following formulas. Refer ticket by user :https://community.powerbi.com/t5/Desktop/Issue-with-Date-function/m-p/1402343#M594708

 

Positive Days in the Day part of Date. It works

 

 

Last_29_Days = 
VAR MaxDate = date(2020,09,30)
Return Date(YEAR(MaxDate),MONTH(MaxDate),DAY(MaxDate)-29)

 

 

 

 

Negative Days in the Day part of Date. It also works

 

 

Last_31_Days = 
VAR MaxDate = date(2020,09,30)
Return Date(YEAR(MaxDate),MONTH(MaxDate),DAY(MaxDate)-31)

 

 

 

 

0 Day in the Day part of Date. It does not work

 

 

Last_30_Days = 
VAR MaxDate = date(2020,09,30)
Return Date(YEAR(MaxDate),MONTH(MaxDate),DAY(MaxDate)-30)

 

 

 

When Negative work. 0 should work. It is an issue.

Please find the screenshot and file attached after signature

 

 Screenshot 2020-09-29 21.54.16.png

Status: New
Comments
v-chuncz-msft
Community Support

@amitchandak 

 

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