Forum Discussion
NPC
Helper I
4 years agoCustom Weeknum
Hello, I'm trying to create a column with custom week numbers (Operating periods) that end in the dates below: 1/1/2022 - 1/12/2022 - Week 1 1/13/2022 - 1/19/2022 - Week 2 1/20/2022 - 1/2...
- 4 years ago
To close the loop on this, this is what ended up working:
Operating Period = WEEKNUM('Calendar'[Date]+4, 21)-1
It gave me this:
To correct the first 5 days of the week that defaulted to Operating Period 0, I added this:
Operating Periods = if('Calendar'[Operating Period] = 0,1,WEEKNUM('Calendar'[Date]+4, 21)-1)
The result was this, which is what I needed:
NPC
Helper I
4 years agoTo close the loop on this, this is what ended up working:
Operating Period = WEEKNUM('Calendar'[Date]+4, 21)-1
It gave me this:
To correct the first 5 days of the week that defaulted to Operating Period 0, I added this:
Operating Periods = if('Calendar'[Operating Period] = 0,1,WEEKNUM('Calendar'[Date]+4, 21)-1)
The result was this, which is what I needed: