Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
94 | |
82 | |
66 | |
58 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |