Skip to content

Commit c69fd3c

Browse files
Merge pull request #809 from pohuan/dev/powei/add-statement-dateadd
Add dateAdd behavior description of extension semantics
2 parents a27783c + 84bda68 commit c69fd3c

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

query-languages/dax/dateadd-function-dax.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,16 @@ The following formula calculates dates that are one year before the dates in the
5757
= DATEADD(DateTime[DateKey],-1,year)
5858
```
5959

60+
## Special behavior
61+
62+
When the selection includes the last two days of month, DATEADD will use "extension" semantics and will include the days till the end of month. For example, when Feb 27 and 28 of 2013 are included in the selection and a month is added, DATEADD will return March 27 to 31.
63+
64+
This behavior only happens when last two days of month are included in the selection. If only Feb 27 is selected, it will go to March 27.
65+
66+
```dax
67+
= DATEADD(DateTime[DateKey], 1, month)
68+
```
69+
6070
## Related content
6171

6272
[Time intelligence functions](time-intelligence-functions-dax.md)

0 commit comments

Comments
 (0)