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
Anonymous
Not applicable

How to have a x axis aligned with numbers

Capture_PowerBI.PNG

I have added a new column Lead Time created using DATEDIFF in the Data view using modelling tab. When I tried to create a column chart with lead time on x axis and count of lead time on y axis it's plotting the columns randomly. I tried changing the axis type to categorical and also checked that the data type is also right as whole number. I want the x axis to be in ascending order like 0,4,5,6,...17,18. 

 

Can you help where am I going wrong? 

And also the created column in data view is not showing up in the power query editor. I created it in data view becuase the custom column in power query editor is not recognizing DATEDIFF().

 

Appreciate your help!!

 

 

2 REPLIES 2
pxg08680
Resolver III
Resolver III

@Anonymous 

 

Have you tried to sort the visual by the column on X-axis..?

 

 

Anonymous
Not applicable

@pxg08680

 

Yes I tried that but nothing changes on the chart. I think it's already sorted out by the column but in descingding order. It's not getting sorted in ascending order.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors