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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
hansreivers
Helper I
Helper I

No scrollbar at the x-axis

Hi Community,

 

I've got the following X-axis (no scrollbar), but when I choose EOMONTH, the datapoints don't represent the actual graph.

Is it possible to create a line-chart visual without a scrollbar, but with actual weeks, like 2020-18 - 2020-19 etc. etc.

 

hansreivers_0-1734529408193.png

 

The format of the week is text and 2020-18 / 2020-19. When I try to make this number/date, for example 202018; between 202052 and 202101 there is a lot "white"space;

hansreivers_1-1734529727136.png

 

In excel you can take the labels and there it is. Here, in PBI I find this very hard. Can someone help me? Thanks!

 

 

6 REPLIES 6
pcoley
Resolver I
Resolver I

@hansreivers 
There is not much you can do if you want a continuous yy-ww format in your x-axis than to resize the chart (if possible).
Power bi will try to show all the data available at the field selected for the x-axis and therefore the need of a horizontal scroll bar. 

If a Text field is used in the x-axis the scroll will appear to guaranty that all that categorical data is shown in the x-axis. If you still need the x-axis with categorical data, there is no way to avoid the horizontal scroll, except to resize the visual object -if possible-. The same thig will happen to a year/week hierarchy (even though the fields year and week were formatted as numbers).
If you want to format yyyyww as a number and use it in a continuos x-axis to avoid the scroll then you won´t get values after week 52/53 (some years can have 53 weeks), and therefore that "white space" (from week 52 until 1st week of next year) in the line chart.
Hope this make more clear the situation. 

mark_endicott
Super User
Super User

@hansreivers - did we resolve your issue? If we did, please select the appropriate solution, it helps with visibility for others and for SuperUsers to keep their status! Thanks!

Hi Mark,

 

Sorry for the delay, but unfortunately not. I'm still trying. I maybe have to create an end of week date, but I can't get it right.

@hansreivers - I spoke earlier of creating a date table using Power Query, did you check the link I posted for you?

 

Once you have done that, there is a specific M Code function that will create the end of week date, you can add this into the code I have linked you to:

 

https://learn.microsoft.com/en-us/powerquery-m/date-endofweek

 

If you are trying to handle this in DAX it will be much harder. Use Power Query to create date tables always.

 

If this helps, please accept as the solution.

Anonymous
Not applicable

Hi @hansreivers ,

 

As far as I know, if you choose Categorical as X-axis Type, it will show all data in this column.

vrzhoumsft_1-1734688317383.png

I'd recommend choosing the X-axis Type as Continuous so that you don't get a scrollbar.

vrzhoumsft_0-1734688207082.png

You can hover your mouse on this visual and it will show detail week numbers.

vrzhoumsft_2-1734688462701.png

Or you can choose show as table to see details.

vrzhoumsft_3-1734688483510.png

vrzhoumsft_4-1734688500635.png

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

mark_endicott
Super User
Super User

In order to view this by weeks in the format you wish, you'll need to create a date table - best way to do this is using Power Query. 

 

There are lots of blogs out there with code that'll get you started on creating a date table, this is one of the best:

https://blog.enterprisedna.co/introducing-power-query-extended-date-table-v2/

 

You might find it already has the week in the format you want. 

 

If this helps, please accept as the solution to assist others with the same challenge. 

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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