Forum Discussion
WeekNum sequence issue
- 5 years ago
Hi Anonymous ,
you need two columns, one with the week as an int, the other as the week as a string, then you will sort the week as a string by the week as int. see image below
Hi Anonymous ,
create a column called Wk as
WEEKNUM('Date'[Date])
then set the 'Sort By Column' of the weekNumber field to your newly created Wk field.
you will find the property in the properties pane or in the columns ribbon
thanks
Hi richbenmintz,
I've set it. but as you can see, "wk10" is the one after "wk1", but not "wk2" after "wk1"
Did I set it correctly?
Thanks.
H
- richbenmintz5 years ago
Resident Rockstar
Hi Anonymous ,
That is the correct setting, but you need to sort by the weenknum as a number, the string wk3 comes after wk29
- Anonymous5 years agoNot applicable
Thats right richbenmintz, so my question is, is there a way to make the weekNum in the correct sequence while keeping "wk" prefix. So that in the chart I can see axis like: 2020 wk1, 2020 wk2 instead of 2020 1, 2020 2
- richbenmintz5 years ago
Resident Rockstar
Hi Anonymous ,
create column that is the week as an int
WEEKNUM('date'[Date])then set the sort by column to the weekNum as int column