Skip to content

Commit c6de6d1

Browse files
Merge pull request #327 from MicrosoftDocs/main638869177718738175sync_temp
For protected branch, push strategy should use PR and merge to target branch method to work around git push error
2 parents 9c3c539 + 178d96e commit c6de6d1

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

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

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,18 @@ Returns a table with a single column named "Date" that contains a contiguous set
3838

3939
## Example
4040

41-
In this example, the MinDate and MaxDate in the data model are July 1, 2010 and June 30, 2011.
41+
In this example, the MinDate and MaxDate in the data model are July 1, 2018 and June 30, 2019. This model contains two calculated tables:
4242

43-
`CALENDARAUTO()` will return all dates between January 1, 2010 and December 31, 2011.
43+
- **CalendarAuto**. Defined as `CALENDARAUTO()`. Returns all dates between January 1, 2018 and December 31, 2019.
44+
- **CalendarAuto3**. Defined as `CALENDARAUTO(3)`. Returns all dates between April 1, 2018 and March 31, 2020. As in this example `fiscal_year_end_month` is 3, the first years starts on April 1st and ends on March 31st. As a result, the range is determined by selecting the first day of the fiscal year on or before the MinDate's year (April 1, 2018) and the last day of the fiscal year after or within the MaxDate's year (March 31, 2020).
4445

45-
`CALENDARAUTO(3)` will return all dates between April 1, 2010 and March 31, 2012. As in this example `fiscal_year_end_month` is 3, the first years starts on April 1st and ends on March 31st. As a result, the range is determined by selecting the first day of the fiscal year on or before the MinDate's year (April 1, 2010) and the last day of the fiscal year after or within the MaxDate's year (March 31, 2012).
46+
Below are measure definitions and their return values on the example model:
47+
48+
```dax
49+
MinDate = MIN('Date'[Date]) //returns July 1, 2018
50+
MaxDate = MAX('Date'[Date]) //returns June 30, 2019
51+
MinCalendarAuto = MIN('CalendarAuto'[Date]) //returns January 1, 2018
52+
MaxCalendarAuto = MAX('CalendarAuto'[Date]) //returns December 31, 2019
53+
MinCalendarAuto3 = MIN('CalendarAuto3'[Date]) //returns April 1, 2018
54+
MaxCalendarAuto3 = MAX('CalendarAuto3'[Date]) //returns March 31, 2020
55+
```

0 commit comments

Comments
 (0)