Forum Discussion
Problem with CalendarAuto()
- 4 years ago
Instead of constructing the date column in InvoiceData table via DAX, you would do it in Power Query.
Add a custom column similar to this :
#date(year, month, day) - all numbers.
Make sure it has date type.
Calendar auto should be able to find and use this.
-----
If you want to go the DAX route, using CALENDAR function, an example is:
CALENDAR ( DATE ( 2010, 1, 1 ), DATE ( 2017, 12, 31 ) )you could hardcode the month and day and use MinYear and MaxYear variables which you already have.
Instead of constructing the date column in InvoiceData table via DAX, you would do it in Power Query.
Add a custom column similar to this :
#date(year, month, day) - all numbers.
Make sure it has date type.
Calendar auto should be able to find and use this.
-----
If you want to go the DAX route, using CALENDAR function, an example is:
CALENDAR (
DATE ( 2010, 1, 1 ),
DATE ( 2017, 12, 31 )
)
you could hardcode the month and day and use MinYear and MaxYear variables which you already have.