Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello,
I have an issue with week numbers. I have created a column called YearWeek using the following:
My issues is that the weeks does not match the right dates. For example in this table it shows that week 3 is between 10-16 of January but in reality it's between 17-24 January. I want week 1 to start with January 3rd.
Can someone please help me?
Thankful for support,
Solved! Go to Solution.
Try this formula:
YearWeek = RIGHT(IF(WEEKNUM('Calendar'[Date], 21)=53 && MONTH('Calendar'[Date])=1, YEAR('Calendar'[Date]) -1, YEAR('Calendar'[Date])),2) & WEEKNUM('Calendar'[Date], 21)
Hello, how about if I want the week number only, WW?
Thank you.
If you want to use a Iso YEAR Week the formula should be like this:
YearWeek = IF(WEEKNUM('Calendar'[Date], 21)=53 && MONTH('Calendar'[Date])=1, YEAR('Calendar'[Date]) -1, YEAR('Calendar'[Date])) & "-" & WEEKNUM('Calendar'[Date], 21)
You need to put another parameter in weeknum function.... the parameter with value 21.
See also link below:
https://community.powerbi.com/t5/Desktop/Looking-for-real-year-week/m-p/1591530#M646306
Hello,
Thanks for your answere. It seems to work. Although is it possible to show YYWW instead of YYYY-WW?
Kind Regards
Try this formula:
YearWeek = RIGHT(IF(WEEKNUM('Calendar'[Date], 21)=53 && MONTH('Calendar'[Date])=1, YEAR('Calendar'[Date]) -1, YEAR('Calendar'[Date])),2) & WEEKNUM('Calendar'[Date], 21)
Thanks for the support, it really helped!
User | Count |
---|---|
101 | |
90 | |
78 | |
70 | |
69 |
User | Count |
---|---|
110 | |
96 | |
95 | |
74 | |
71 |