Forum Discussion
Switch in calendar
Hi Folks
2 things I am looking answers for if possible, the formula below returns the period based on the calendar [week]. So weeks 1,2,3,4 = period 1, 5,6,7,8 = period 2 9,10,11,12,13 =period 3 and so on up to 52. I want to reduce this formula, I tried using curly brackets but it gives me an error. Secondly, I would prefer to get the desired result in the query editor using a custom column if possible, thanks for your time.
4 Replies
- mahoneypat
Microsoft Employee
Please see if this article helps. It has a Date table created in the query editor that may work for you.
445 Calendar with 53-Week Years – Hoosier BI
Pat
- Brendy_P
Helper I
Hi Pat
Brillant!!! i have just watch your Youtube video and have learnt a little bit more on my journey about Power BI and Power Query. I will use your formula going forward and adapt it to what I need but I not sure if solves my initial question. No matter what I will dig deeper into your tutorial and hopefully learn a bit more thanks again
- serpiva64
Solution Sage
Sorry,
which is the rule to decide if period is made of 4 or 5 weeks?
- Brendy_P
Helper I
Hi Serpiva
If I can explain every 3rd, 6th, 9th and 12th period consists of 5 weeks. So weeks 1-4 is period 1, weeks 5-8 is period 2, so weeks 9-13 is period 3 then revert back to 14-17 which is 4 weeks for period 4. Essentially periods 3,6,9,12 all are 5 week periods, all other periods are 4 weeks. Hope this helps