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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 NL Carousel

Fabric Community Update - February 2025

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