sql-bi / DaxDateTemplate

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

Fiscal Quarters #2

Closed migueesc123 closed 7 years ago

migueesc123 commented 7 years ago

Hey Marco,

Here are my current settings: `Date =

-- -- Configuration


VAR TodayReference = TODAY () -- Change this if you need to use another date as a reference "current" day VAR FirstYear = 2008 VAR LastYear = YEAR ( TodayReference ) VAR FiscalCalendarFirstMonth = 9 -- For Fiscal 52-53 weeks (start depends on rules) and Gregorian (starts on the first of the month) VAR FirstDayOfWeek = 0 -- Use: 0 - Sunday, 1 - Monday, 2 - Tuesday, ... 5 - Friday, 6 - Saturday VAR WeeklyType = "Last" -- Use: "Nearest" or "Last" VAR QuarterWeekType = "445" -- Supports only "445", "454", and "544"`

For some reason I'm getting FQ5 and FQ6 on the Fiscal Quarter and Fiscal QuarterNumber. Is that correct? Also, what columns are the columns for the Fiscal 52-53? I see some that start with FW (perhaps Fiscal Weekbased?) and others that start with Fiscal

Adding an image for reference: image

marcosqlbi commented 7 years ago

I will investigate on it - thanks for reporting the issue! FW = Fiscal Weekly Fiscal = Fiscal Monthly Feedback about naming convention is also welcome! :)

marcosqlbi commented 7 years ago

I committed a new version that solves the calculation issue you reported. Thanks!