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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
MarkSL
Helper V
Helper V

Column chart by Week Number issue

Hi,

 

I have a Line and Clustered Column chart, which charts by sales by Week Number since 01/01/2018.  This was fine for all of last year, but now that we are into 2019, Week 1 & 2 from 2019 are of course being merged into 2018.  I therefore need to update my chart to somehow differentiate between 2018/9 whilst still showing the Week Numbers and trend in one single view.

 

Week Number was coming from my DateTable as was define as:  "Week No", WEEKNUM([Date]),

 

This is how it looks currently, where Week 1 is now including 2018 and 2019:

 

chart1.png

 

I have tried adding Year into my 'Week No' calculation, thus making it:  "Year Week No", YEAR([Date]) * 100 + FORMAT(WEEKNUM([Date]),"00")

 

But this results in the below and my X-Axis is less descriptive and I get the large gap in the data for 201854 through to 201899:

 

chart2.png

 

And if I change the X Axis Type to Categorical, I get closer to what I want, but it is no longer in one view:

 

chart3.png

 

Ideally I would like to see two X Axis descriptions (Year and Week Number), like what you can get with the new Date hieararchies, however these seem to only work with Year / Quarter / Month / Date.

 

Any ideas or feedback on how others have charted Week Number across multiple years greatly appreciated!

 

Thanks

 

Mark

 

 

 

1 ACCEPTED SOLUTION
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @MarkSL,

 

You could place both [Year] column and [Week No] column onto shared Axis, then, drill down the chart to "Year-Week No" level.

1.PNG

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @MarkSL,

 

You could place both [Year] column and [Week No] column onto shared Axis, then, drill down the chart to "Year-Week No" level.

1.PNG

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

I don't know about the initial author, but this definately did help me with the same question. 🙂

sturlaws
Resident Rockstar
Resident Rockstar

Hi Mark,

 

you could try to add a start-of-the-week-date column in you date table. It could be achived with something like this, based on your date column:

 

start of week date = DATEADD(DateTable[date]; (WEEKDAY(DateTable[date];2)-1)*-1;DAY)

 

Use DateTable[start of week] on the axis, and you will have something that behaves nicely, although it will not show the weeknumber. You could put weeknum on the tooltip of the chart(but you need to treat it as a measure).

Regards,

Sturla

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Top Solution Authors