Forum Discussion
Show week 1 after week 52
I found a bug in my report now when it shows data from both 2019 and 2020 (all the visuals are showing the data from the past 3 months). There are two issues and I'm not sure if they are linked to each other.
My calendar table:
Secondly, My week 1 is showing in the beginning of the x-axis. I want it to be in a chronological order. I have tried to create a column to sort by, but get an error. "There cant be more than one walue in "Sortingweek" for the same value in "week" and I don't really know how to solve that.
- Anonymous6 years ago
For your first question, try:
WEEKNUM([Date]; 21)
Instead of
WEEKNUM([Date]; 2)
For your second question try taking a look here:
https://docs.microsoft.com/en-us/power-bi/desktop-sort-by-column
https://community.powerbi.com/t5/Desktop/Sorting-error-can-t-be-more-than-one-value/td-p/707001
You Week num is simply a number from 1 to 52, but sort has year. It means 52 can have multiple sort values. like 201852, 201952. This is causing the issue
4 Replies
- AnonymousNot applicable
For your first question, try:
WEEKNUM([Date]; 21)
Instead of
WEEKNUM([Date]; 2)
For your second question try taking a look here:
https://docs.microsoft.com/en-us/power-bi/desktop-sort-by-column
https://community.powerbi.com/t5/Desktop/Sorting-error-can-t-be-more-than-one-value/td-p/707001
- amitchandak
Super User
Try
if(WEEKNUM([Date])=53,1,WEEKNUM([Date]))
- amitchandak
Super User
You Week num is simply a number from 1 to 52, but sort has year. It means 52 can have multiple sort values. like 201852, 201952. This is causing the issue
- AnonymousNot applicable
Anonymous Can you accept the answer if it helped you?