cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Custom Calendar with 28 days and 4 weeks in a month

I have a requirement where i have a start and end date but here the month has to be 28 days and each month consists of 4 weeks.

Currently i have done this 

9192gks_0-1666415261361.png

 

but the problem here is, i am not able to reset the month or the week column i.e my weeknum should be 1,2,3,4,1,2,3,4 instead of 1,2,3,4,5,6,7,8.. 

Same goes with the month(Row number column) after the year end it should reset and start from 1.

1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

@Anonymous I created this calendar for you in the attached PBIX file below signature. Here are some of the columns:

Sequential = COUNTROWS(FILTER('284Calendar',[Date]<=EARLIER([Date])))

FY = 2020 + TRUNC([Sequential]/364)

Month = TRUNC(COUNTROWS(FILTER('284Calendar',[Date]<EARLIER([Date]) && [FY] = EARLIER([FY])))/28) + 1

Week = TRUNC(COUNTROWS(FILTER('284Calendar',[Date]<EARLIER([Date]) && [FY] = EARLIER([FY]) && [Month] = EARLIER([Month])))/7) + 1

@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

1 REPLY 1
Greg_Deckler
Super User
Super User

@Anonymous I created this calendar for you in the attached PBIX file below signature. Here are some of the columns:

Sequential = COUNTROWS(FILTER('284Calendar',[Date]<=EARLIER([Date])))

FY = 2020 + TRUNC([Sequential]/364)

Month = TRUNC(COUNTROWS(FILTER('284Calendar',[Date]<EARLIER([Date]) && [FY] = EARLIER([FY])))/28) + 1

Week = TRUNC(COUNTROWS(FILTER('284Calendar',[Date]<EARLIER([Date]) && [FY] = EARLIER([FY]) && [Month] = EARLIER([Month])))/7) + 1

@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Exciting changes

Power BI Community Changes

Check out the changes to the Power BI Community announced at Build.

May 2023 update

Power BI May 2023 Update

Find out more about the May 2023 update.

Kudo Data Story carousel

Data Stories Gallery

Visit our Data Stories Gallery and give kudos to your favorite Data Stories.

Top Solution Authors