Forum Discussion
Week Year Representation
- 5 years ago
Anonymous , I think my mistake, we need to do it on week year , try this
Week Start date = 'Date'[Date]+-1*WEEKDAY('Date'[Date],2)+1
Week Year = year([Week Start date])
min week start of year = minx(filter('Date',[Week Year] =earlier([Week Year])),[Week Start date])
week No = quotient(datediff([min week start of year],[date],day),7)+1 - 5 years ago
Anonymous , Are you looking for ISO week
ISO Week1 = WEEKNUM([Date],21)
Anonymous , Create these columns in date table
Week Start date = 'Date'[Date]+-1*WEEKDAY('Date'[Date],2)+1
min week start of year = minx(filter('Date',[Year] =earlier([Year])),[Week Start date])
week No = quotient(datediff([min week start of year],[date],day),7)+1
- amitchandak5 years agoSuper User
Anonymous , I think my mistake, we need to do it on week year , try this
Week Start date = 'Date'[Date]+-1*WEEKDAY('Date'[Date],2)+1
Week Year = year([Week Start date])
min week start of year = minx(filter('Date',[Week Year] =earlier([Week Year])),[Week Start date])
week No = quotient(datediff([min week start of year],[date],day),7)+1- Anonymous5 years agoNot applicable
hi amitchandak ,
A small mistake on the requirement that the week should be rolled to the max no days belongs to which year.For e.g., If we take the week from 28-dec-2020 to 3-Jan-2021 maximum no of days are from 2020 so the output should be 53-2020 for those days.
Please help me this is urgent.
Thanks in advance
- amitchandak5 years agoSuper User
Anonymous , Are you looking for ISO week
ISO Week1 = WEEKNUM([Date],21)