Forum Discussion
Week Year Representation
Hi all,
I need you help in getting the week year representation in such a way that if every week year should be havinf 7 days from Mon-Sun.
For e.g., If we see Dec-2020 dates 28,29,30,31 comes under Week-53 and this is an incomplete week so it also should contain 1,2,3 dates of Jan-2021 into it so that it has total of 7 days and week-1 2021 should start from 4-Jan-2021
Thanks in advance,
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)+1Anonymous , Are you looking for ISO week
ISO Week1 = WEEKNUM([Date],21)
6 Replies
- amitchandakSuper User
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
- AnonymousNot applicable
- amitchandakSuper 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