Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
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 possible dates for each year. In column B, I have a "Week 1, Week 2, Week 3, etc." assigned to a day, with each Week repeating 7 times. In column C, I have a field that is the year-month-day combo in the format YYYYMMDD.
When trying to sort column B (Week data) by column C, I receieve the error:
We can't sort the 'Week" column by 'YearMonthDay.' There can't be more than one value in "YearMonthDay' for the same value in 'Week'. Please choose a different column for sorting or update the data in 'YearMonthDay'.
I have read other forum posts, but I believe this issue is different. I have even looked at the data in an Excel PivotTable, and can confirm there is not more than 1 count of any YearMonthDay value.
Can anyone assist? Thanks in advance!
You sort YYYYWW or week start date. Please refer this file
https://www.dropbox.com/s/d9898a48e76wmvl/sales_analytics_weekWise.pbix?dl=0
This 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.
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingJoin the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
User | Count |
---|---|
85 | |
42 | |
30 | |
27 | |
26 |