Forum Discussion
When using CALENDARAUTO() in a new table, for Calendar, I get dates from 1900 approx.
- Anonymous5 years ago
Hi Syndicate_Admin ,
CALENDARAUTO() is intended to generate the dates by taking the minimum date and maximum date from your model as date range (Which is your expected output as well). Make sure your date fields have proper values and types.
The date fields that you want to consider in CALENDARAUTO() function needs to be of date/datetime datatype. Also it will not consider any calculated fields or tables.
This is the related document, you can view this content:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
You can use CALENDAR(DATE(2019,1,1),NOW())
SOLVED!!!!!
CALENDARAUTO is doing what it should. And this may have repercussions for any new business using Power BI, especially those keeping birthdates of the elderly.
In all iterations of AdventureWorks (OLTP and DW, 2008R2 to 2019), DimCustomer[Birthdate] starts in 191[6-7] and DimEmployee[BirthDate] starts in 1939. Details below.
Change the type of each to text.
Nulls in Date/DateTime fields do not affect CALENDARAUTO. Example: DimEmployee[EndDate].
AdventureWorks Dates Affecting CALENDARAUTO()
DBVersion min(Employee[BirthDate])
2008R2 1945-11-17
2008R2DW 1934-01-11
2012 1951-10-17
2012DW 1939-07-11
2014 1951-10-17
2014DW 1939-07-11
2019 1951-10-17
2019DW 1939-07-11
2020DW 1939-07-11
DBVersion min(Customer[BirthDate])
2008R2DW 1914-08-13
2012DW 1916-02-10
2014DW 1916-02-10
2019DW 1916-02-10
2020DW 1916-02-10
Have fun 🙂