Search code examples
powerbipowerquerypowerbi-desktop

Date column with custom start and end dates


I created a date column using the below formula but after 31 December the next date is 1 April.

UK Fiscal Date Calendar =CALENDAR(DATE(2023,4,6),DATE(2024,4,5))

Can someone please advise where I'm going wrong? I'm trying to have a date column that starts on 6 April and ends 5 April.


UPDATE:

I was able to correct my issue but I'm left with another one where:

FiscalMonth = (If( Month([Date]) >= 4 , Month([Date]) - 3,Month([Date]) + 9 ))

The above formula works except for April 1 to April 5 where it allocates it a 1 instead of a 12. Its rightly following the logic but I'm trying to find a way to make those 5 days show as Fiscal Month 12 instead.

Thanks


Solution

  • your code works - you may have some other filter overriding your dates.

    enter image description here