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.
Our company use such logic for week numers: http://prntscr.com/ejqqt0
If the last week of the year contains at least one day of the next year, we mark this last week as the first week of the new year
When i try to use WEEKNUM('Календарь'[Дата];21), the first week of year starts from 02.01.2017, but we need from 26.12.2016
http://prntscr.com/ejqrji
Is there any way to do such week numeration?
Solved! Go to Solution.
Hi @googlogmob,
In your scneairo, you get that result because you use 21 parameter in your WEEKNUM function. If you want to get the expected result, please create the calculated column like below.
Year = YEAR('Table'[Date])
Weeknumber = WEEKNUM('Table'[Date],2)
Weeknumber2 = IF(CALCULATE(COUNT('Table'[Weeknumber]),ALLEXCEPT('Table','Table'[Year],'Table'[Weeknumber]))<7,1,'Table'[Weeknumber])
Regards,
Charlie Liao
Hi @googlogmob,
In your scneairo, you get that result because you use 21 parameter in your WEEKNUM function. If you want to get the expected result, please create the calculated column like below.
Year = YEAR('Table'[Date])
Weeknumber = WEEKNUM('Table'[Date],2)
Weeknumber2 = IF(CALCULATE(COUNT('Table'[Weeknumber]),ALLEXCEPT('Table','Table'[Year],'Table'[Weeknumber]))<7,1,'Table'[Weeknumber])
Regards,
Charlie Liao
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 |
---|---|
112 | |
97 | |
84 | |
67 | |
60 |
User | Count |
---|---|
150 | |
120 | |
99 | |
87 | |
68 |