cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
_Kristina_ Regular Visitor
Regular Visitor

How to show just the week number in my chart when I have data from several years

Hi guys.

 

I'm trying to make a line chart showing a development in the number of customers in my company. On the x axis I want to show the week number, but I have several years of data. I managed to make a column showing the week numbers like this: 201738, but I don't think this looks very good in my chart. Is it possible to show just the week numbers but still sort after years?

 

Hope some of you can help,

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
_Kristina_ Regular Visitor
Regular Visitor

Re: How to show just the week number in my chart when I have data from several years

I tried a range of different stuff, and this is how I best solved my problem:

 

First of all I made a calendar table

Date = CALENDAR (DATE(2015;1;1); DATE(YEAR(LASTDATE(...));Month(LASTDATE(....));DAY(LASTDATE(...))))

 

I then made a hierachy with week and year. Drilled down my chart to the lowest level. Went to formatting pane to switch off the concatenation and then I had my weeks in the right order with the year showing below.

 

To show latest 10 weeks I used the date table to make a relative slicer.

 

View solution in original post

7 REPLIES 7
SivaMani Senior Member
Senior Member

Re: How to show just the week number in my chart when I have data from several years

@_Kristina_,

 

Create a calculated column like below,

 

WeekNo = WEEKNUM(Table[Date],1)

 

1 -> week begins on Sunday

2 -> week begins on Monday

_Kristina_ Regular Visitor
Regular Visitor

Re: How to show just the week number in my chart when I have data from several years

@SivaMani Thanks, but I already tried this. The problem is that in my chart, all of the week 1 will be in one point on the axis, all of the week 2s will be in another point and so on. I need to sort after both year and week. Don't know if it makes any sense.

 

Thanks 🙂

SivaMani Senior Member
Senior Member

Re: How to show just the week number in my chart when I have data from several years

@_Kristina_,

 

In that case, 

Better to keep the year with week number

vcastello Member
Member

Re: How to show just the week number in my chart when I have data from several years

Hi @_Kristina_

You can try @SivaMani approach. The solution is correct.


But you can add the Year in the visual under the WeekNum so there will be only a WeekNum per year

Hope Tant Helps

Vicente

_Kristina_ Regular Visitor
Regular Visitor

Re: How to show just the week number in my chart when I have data from several years

Thank you both @vcastello @SivaMani 🙂

_Kristina_ Regular Visitor
Regular Visitor

Re: How to show just the week number in my chart when I have data from several years

I tried a range of different stuff, and this is how I best solved my problem:

 

First of all I made a calendar table

Date = CALENDAR (DATE(2015;1;1); DATE(YEAR(LASTDATE(...));Month(LASTDATE(....));DAY(LASTDATE(...))))

 

I then made a hierachy with week and year. Drilled down my chart to the lowest level. Went to formatting pane to switch off the concatenation and then I had my weeks in the right order with the year showing below.

 

To show latest 10 weeks I used the date table to make a relative slicer.

 

View solution in original post

vcastello Member
Member

Re: How to show just the week number in my chart when I have data from several years

Great Solution.

 

Congratulations !!!!

 

Vicente

Helpful resources

Announcements
New Ranks and Rank Icons in 2020

New Ranks and Rank Icons in 2020

Read the announcement for more information!

New Kudos Given Badges Coming

New Kudos Given Badges Coming

We're rolling out new Kudos Given badges. Find out how many Kudos you've given.

November 2019 Community Highlights

November 2019 Community Highlights

Get an overview of the events and great community content from November.

Power Platform World Tour

Power Platform World Tour

Find out where you can attend!

Top Solution Authors
Top Kudoed Authors (Last 30 Days)