Forum Discussion
Custom Column on Week
- 5 years ago
Update it as follows:
#"Added Custom1" = Table.AddColumn(#"Sorted Rows", "Week Number", each if Date.WeekOfYear([Date],6)>52 then 52 else if ([Year]=2021 and List.Contains({1,2}, Date.WeekOfYear([Date],6))) then 1 esle if [Year]=2021 then (Date.WeekOfYear([Date],6)-1) else Date.WeekOfYear([Date],6))Please mark the question solved when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
So what is the expected result in the pic above?? I don't understand the requirement. Please detail the week number that you want for each of those days (and others if relevant)
Please mark the question solved when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
- Chanleakna1235 years agoPost Prodigy
hi AlB , as i circle it show the number it is "Week" , below is the formula you recommend to fix on 01/01/2021-01/08/2021 is the Week 1 , and we have fixed that , but on 01/09/2021-01/15/2021 it show Week 3 , but it should be Week 2 ,