sql-bi / DaxDateTemplate

Power BI template to create a Date table in DAX
MIT License
267 stars 76 forks source link

Calendar only populating up to Dec. 28, 2019 #26

Closed egarstad closed 4 years ago

egarstad commented 4 years ago

When setting

FiscalCalendarFirstMonth = 1 and CalendarRange = "Calendar"

the calendar only creates dates up until Dec. 28, 2019. Using any other month for FiscalCalendarFirstMonth the calendar will populate up to Dec. 31, 2019.

marcosqlbi commented 4 years ago

Can you send me the complete configuration? I want to reproduce and it is probably related to other settings.

egarstad commented 4 years ago

Hi Marco,

The issue is reproducible using the template file V1.11 that is available for download from GitHub. Simply changing FiscalCalendarFirstMonth from 7 to 1 (with no other changes) will cause the issue to happen.

marcosqlbi commented 4 years ago

It seems the issue is caused by the CompleteCalendarExpanded variable – this is the right assignment:

VAR CompleteCalendarExpanded = NATURALLEFTOUTERJOIN( FiscalStandardGregorian, NATURALLEFTOUTERJOIN ( CalendarStandardGregorian, FiscalWeeks ) )

I will publish an updated version soon. Thanks!

marcosqlbi commented 4 years ago

Version 1.12 published including this fix