Forum Discussion
Chanleakna123
5 years agoPost Prodigy
Custom Column on Week
hi all , can anyone help me with the code ? in Year 2021 is the different between the Past Year. as i calculate Week Number I used the Code : if Date.WeekOfYear([Date],6)>52 then 52 else Date.W...
- 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
Chanleakna123
5 years agoPost Prodigy
Anonymous , hi , new week number show 53 , it is not right dear.
we have only 52 weeks , can we do it on Mcode rather calculated column ?