Forum Discussion
aralbrecht
6 years agoNew Member
Sort by column error
Hello all, I am attempting to create a line chart by week that spans multiple years. I would like Week 52 of 2019 to show up before Week 1 of 2020 on the X-axis. In column A I have all possib...
edhans
Community Champion
6 years agoThis is the same issue. What is happening is column C is at the daily granularity level - YYYYMMDD, so 365/366 values per year. But your week is obviously only at the week level, so 52/53 values per year. Your column C needs to be the week number. You can get this easily in your date table in Power Query using Date.WeekOfYear([Date]), or in DAX using WEEKNUM() if your date table was generated in DAX.
The Sort By column has to have the EXACT same number of distinct values as the column you are sorting. Not one more, not one less. Or it won't work. Has to be a 1:1 relationship.