Forum Discussion
Anonymous
6 years agoNot applicable
Continuous week number with year
Hello everyone, I am new to PowerBI and still learning. I have 1 year worth of data which runs from March 2019 to March 2020 which I need to get a comparison in volume per week. I have this f...
- 6 years ago
Anonymous
try
Reported Week Year = var _W = WEEKNUM('Reported Date'[Reported Date]) RETURN YEAR('Reported Date'[Reported Date]) & "W" & IF(_W<10, "0"&_W, _W)
Anonymous
6 years agoNot applicable
wow! I did not know that. This is actually an improvement. However, using this solution, it sorts it to what I want but with the year 2020 sorts it as 2020W1, 2020W10, 2020W2, 2020W3, and so on.
az38
6 years agoCommunity Champion
Anonymous
try
Reported Week Year =
var _W = WEEKNUM('Reported Date'[Reported Date])
RETURN
YEAR('Reported Date'[Reported Date]) & "W" & IF(_W<10, "0"&_W, _W)