Join 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!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hi,
I have created a simple line graph with year/month name/week of year on the x-axis, the graph is set to show the last 2 months. The problem is that week 1 appears in both 2024 and 2025 and ends up at the start of december and at the start of january instead of at the end of december and the start of january.
I created a calculated column like this: "UniqueYearWeek = YEAR([Date]) * 100 + WEEKNUM([Date], 2) +DAY([Date]) / 1000" and then tried to sort week of year by that column, but since each week of year appears multiple times, that does not work.
I feel like this is a problem that more people probably have faced. How have you solved it?
Thanks in advance!
@Jodallen123 Hi! Try with:
AdjustedWeekYear =
VAR StartOfWeek = [Date] - WEEKDAY([Date], 2) + 1 // Start of the week (ISO standard)
VAR WeekYear = YEAR(StartOfWeek) // Year of the start of the week
RETURN WeekYear * 100 + WEEKNUM([Date], 2)
Replace the column used for sorting and x-axis ordering with this new.
BBF
Thanks!
I added this column but I am not sure of how to use it. Do you mean that I should sort my "week of year"-column by that new column? Because that does not work. Or do you mean that I should use it instead of week of year in my graph like below? Or is there another option?
Ideally I want the same layout as in the first picture I posted, but with week 1 in december after week 52, but maybe that's not possbile?
Hi, @Jodallen123
Forgive me for not fully understanding your question. Is this the result you expected?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.