Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
rayishome
Resolver I
Resolver I

Trend by Week of Year

Seems like an easy concept to solve, but it's proven to be harder than expected.

 

Options I've Tried:

  1. Date Hierarchy:  This doesn't have a weeks level
  2. Use WeekNum:  This works great until you cross years
  3. Creating a Column to concatenate Year and WeekNum as a string: Trendlines are not an option for strings
  4. Creating a Column to concatenate year and WeekNum as a Int: When crossing years the continuous value does not understand 201652 and 201701 are next to each other creating gaps.

 

The goal is to create a line chart that provides a Trend Line and a Forecast summarizing by Week of the year that will span multiple years.  

 

Thanks

1 ACCEPTED SOLUTION

Thanks!  The Hierarchy didn't work as it's switched from Continuous to Categorical.  However, using Query: Week = Date.StartOfWeek([Date]) did create a grouping level by week I was able to use.  Thanks

View solution in original post

4 REPLIES 4
dkay84_PowerBI
Microsoft Employee
Microsoft Employee

One option you haven't tried is to make your own date hierarchy.  Simply drag Year, Qtr, Mnth, Week etc. in order to you axis field and see if that allows you to view the weekly trend without the other issues you described.  You will have to expand your axis (part of the drill down experience) and it should keep track of the levels of the hierarchy as part of the axis labeling.

Thanks!  The Hierarchy didn't work as it's switched from Continuous to Categorical.  However, using Query: Week = Date.StartOfWeek([Date]) did create a grouping level by week I was able to use.  Thanks

This worked very well. It was so clever and elegant, thank you! 

For those wondering, you can just add the new date into the axis field.

The sad part is that we now don't get the Week Number in the Axis, but got it in the Tooltip.

I ran into a similar challenge and wanted to share my solution. I have a [Date] column which I want to group by weeks across multiple years and use for chart axes.

 

First created a calculated column WeekNum = weeknum([Date]). On the chart place the [Date] field on the axis, using date hierarchy and keeping only Year, then place WeekNum underneath. It was sorted incorrectly at first. I had to sort multiple times before the desired order came up (oldest <--> newest).

 

Capture.PNG

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors