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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
shreep1
Helper III
Helper III

X-axis labelling time intervals Line & Clustered Column Chart

@Amit@Greg , @tamerj1 , @lbendlin 

I have made a Line & Clustered Column Chart where my X-axis labels are timeclocks starting from 0, 1, 2, all the way to 23. However, when I add the Line & Clustered column chart, I can only see the labelling in the intervals of 0, 5, 10, 15 and 20 with in-between values missing. I tried to add the in between values by going under Format Your Visual and checking at Visual and General category. I found no way to edit the X-axis, I can change the color for the conditional formatting for each of the value 0, 1,2,3,4,5,6, etc..all the way to 23 but cannot add the in-between values in the X-axis. Can you please suggest how to fix this X-axis labelling issues?

 

shreep1_0-1680206472509.png

 

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

Make the visual wider, or change the x axis type to categorical (NOTE: that will eliminate the gap). 

View solution in original post

6 REPLIES 6
shreep1
Helper III
Helper III

@lbendlin 

 

What do you mean by having another column with numeric hour values? Are you saying 1:00 pm should be represented as 13:00 PM and 5:00 pm be written as 17:00 PM and then sorting them or breaking the original Hour Column into Hour AM and Hour PM and including only the relevant values there and putting the newly created columns into X-axis having 2 X-axis and sorting them ?

 

shreep1
Helper III
Helper III

@lbendlin 

Thank you! This helps! Yes, after that I need to filter for the X-axis and sort the X-axis in ascending order. 

 

 

lbendlin
Super User
Super User

Make the visual wider, or change the x axis type to categorical (NOTE: that will eliminate the gap). 

@lbendlin 

 

But if the X-axis is changed into AM and PM format using the DAX IF code, how do we sort the X-axis in a chronologial order from 12:00 am, 1:00 am, 2:00 am......11:00 pm? When we sort the X-axis in ascending order PowerBI reads like this:

 

shreep1_1-1680209345813.png

 

Looks like PowerBI reads only the number in ascending order ignoring the AM & PM. Do you know how to fix this issue?

 

Have another column with the numeric hour values. Sort your x axis column by that numeric column.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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.