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.
I've used CALENDARAUTO(3) to create my calendar table but it starts at this fiscal year. How would I compare YTD performance to the prior year if my calendar table doesn't contain those dates?
Solved! Go to Solution.
Hi @joeort,
CALENDARAUTO() automatically creates a table with one column named "date". The range of dates is calculated automatically based on data in the model. For having years included in your date-table, which are not part of your data model you cannot use CALCULATEAUTO(). Try something like the following:
YourCalendarTable =
CALENDAR (
DATE ( YEAR ( MIN ( YourTable[DateColumn] ) -1 ); 1; 1 );
DATE ( YEAR ( MAX ( YourTable[DateColumn] ) ); 12; 31 )
)
Regards,
Lars
Hi @joeort,
CALENDARAUTO() automatically creates a table with one column named "date". The range of dates is calculated automatically based on data in the model. For having years included in your date-table, which are not part of your data model you cannot use CALCULATEAUTO(). Try something like the following:
YourCalendarTable =
CALENDAR (
DATE ( YEAR ( MIN ( YourTable[DateColumn] ) -1 ); 1; 1 );
DATE ( YEAR ( MAX ( YourTable[DateColumn] ) ); 12; 31 )
)
Regards,
Lars
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
97 | |
96 | |
82 | |
74 | |
66 |
User | Count |
---|---|
121 | |
105 | |
102 | |
82 | |
72 |