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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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