PowerBI Date dimension table

Job ID: 32303806

Budget: $15 – $25 USD

I have some unique requirements for a date dimension file specifically around unique requirements to show if a date is in a month and quarter as well as the number of week. We use a 4/4/5 week schedule and the first week can have more than 7 days in it. For example for 2022, Jan 1st to Jan 8th is considered week 1 of the year even though it has 8 days because Jan 2nd is the first Sunday of the year. The fiscal month of January actually ends on Feb 4th (4weeks), Feb ends on March 4th (4 weeks) and March ends on April 2nd (5 weeks). The 1st quarter, therefore, ends on April 2nd. You can see the details attached. I am looking for M code similar to what is attached.
Related categories: Programming Microsoft PowerBI