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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
holgerson
Regular Visitor

Displaying week numbers on x-axis

Hi experts,

 

I have a problem displaying week numbers on the x-axis. If I use a regular time hierarchy (based on dates), only dates or months are displayed on the x-axis. So, I decided to build a week number variable by myself in the form of YYYYWW (e.g. 201901), but when I use this integer variable as “continuous” the values which cannot be weeks (e.g. 201967) are also displayed on the axis. As “categorial” everything is sorted wrong and additionally you would have to scroll on the x-axis to have a look at the data.

 

Does anybody has ideas for a workaround to display week numbers continuously on the x-axis? This is how it looks like at the moment:

 

test.JPG

 

This is how it should look like:

 

461B3A75.PNG

 

 

If you need a pbix file with a minimum example dashboard I can provide it later.

 

Thanks in advance,

Holger

 

@Floribert 
1 ACCEPTED SOLUTION
Mariusz
Community Champion
Community Champion

Hi @holgerson 

 

For the sorting issue, please refer to the article below.

https://docs.microsoft.com/en-us/power-bi/desktop-sort-by-column

 

201967 seams little odd  and it should not happen if formatted correctly

FORMAT( TODAY()-10, "YYYYWW") -- will return 201952

 

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

 

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hello @holgerson 

Did you find a solution about the continuous/categorical x-axis ?

Mariusz
Community Champion
Community Champion

Hi @holgerson 

 

For the sorting issue, please refer to the article below.

https://docs.microsoft.com/en-us/power-bi/desktop-sort-by-column

 

201967 seams little odd  and it should not happen if formatted correctly

FORMAT( TODAY()-10, "YYYYWW") -- will return 201952

 

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

 

Thanks @Mariusz for your quick help. The nonsense weeks and sorting issue is now fixed. The only remaining issue is the scroll bar on the x-axis as now you can't choose between continuous/categorical in the new formatted week variable. Especially if the graph is only a small part of a dashboard and a large time range is chosen the user has to scroll much:

 

Unknown.JPG

 

 

 
 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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