Forum Discussion
Week number by year
- 6 years ago
Hey Anonymous
Just create an additional calculated column that contains an integer value like so
yearweekno = year('<tablename>'[date]) * 100 + weeknum('<tablename>'[date])
Then you can use this column to sort your column that contains these valuesweek 51 (2019) week 52 (2019) week 1(2020) week 2 (2020)
This explains the feature "Sort by column": https://docs.microsoft.com/en-us/power-bi/desktop-sort-by-column#sort-using-the-sort-by-column-button
The same article also explains how the sort order can be adjusted in visuals.
Hopefully this provides what you are looking for.
Regards,
Tom
Hey Anonymous
Just create an additional calculated column that contains an integer value like so
yearweekno = year('<tablename>'[date]) * 100 + weeknum('<tablename>'[date])
Then you can use this column to sort your column that contains these values
week 51 (2019) week 52 (2019) week 1(2020) week 2 (2020)
This explains the feature "Sort by column": https://docs.microsoft.com/en-us/power-bi/desktop-sort-by-column#sort-using-the-sort-by-column-button
The same article also explains how the sort order can be adjusted in visuals.
Hopefully this provides what you are looking for.
Regards,
Tom
- Anonymous6 years agoNot applicable
TomMartens Thanks! it worked