Forum Discussion
Weekly sales
Hi Anonymous
Using what you already have, you could create a new calculated column:
Week of the year 2 =
IF (
( Table1[year] = 2019 && Table1[ Week of the year] = 53 )
|| ( Table1[year] = 2020 && Table1[ Week of the year] = 1 );
1;
Table1[ Week of the year]
)
What we are doing is imply assign week number 1 to both week 53-2019 and week 01-2020 and leave all the rest as it already was.
Please mark the question solved when done and consider giving kudos if posts are helpful.
Cheers ![]()
- Anonymous6 years agoNot applicable
Hello
Thank you very much for your answer.
I used your DAX expression. But it shows same as before. Or i made mistake with my expression.
- AlB6 years ago
Community Champion
Hi Anonymous
You haven't copied my code correctly. The second check is on [Week of the year], not on [year]
Week of the year 2 =
IF (
( Table1[year] = 2019 && Table1[ Week of the year] = 53 )
|| ( Table1[year] = 2020 && Table1[ Week of the year] = 1 );
1;
Table1[ Week of the year]
)- Anonymous6 years agoNot applicable
oh it was my mistake. Thank you very much again. 😊 You saved me.