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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
josephsoto
New Member

I need to have this graph from week 50 to week 51, not the other way around as showing right now.

josephsoto_0-1640704387047.png

 

1 ACCEPTED SOLUTION
s7elijah
New Member

Hello @josephsoto,

Looking at your x axis, since you have a value for "51B" the column you are using is not numeric and therefore Power BI is not sorting in numerical order. My recommendation is to create an additional table which has a column for the values in your x axis and then a column for the order you would like to impose. Example:


ValueOrder
51B2
500
511

 

Once you have this, you can create a relationship between this new data source and the data source containing your x axis. You'll need to add a new custom column to the orignal data source you can use the related function in DAX to bring the order over from the new data source. From here, it's simply a need to sort one column (the one containing your x axis values) by another (the order column you brought in from the new data source).

Both hyperlinks contain additional documention directly from Microsoft. I hope you find this helpful!

View solution in original post

2 REPLIES 2
josephsoto
New Member

Hi,

Thanks for your efforts to help.

I was able to fix it by sorting the axis.

josephsoto_0-1640747028975.png

 

s7elijah
New Member

Hello @josephsoto,

Looking at your x axis, since you have a value for "51B" the column you are using is not numeric and therefore Power BI is not sorting in numerical order. My recommendation is to create an additional table which has a column for the values in your x axis and then a column for the order you would like to impose. Example:


ValueOrder
51B2
500
511

 

Once you have this, you can create a relationship between this new data source and the data source containing your x axis. You'll need to add a new custom column to the orignal data source you can use the related function in DAX to bring the order over from the new data source. From here, it's simply a need to sort one column (the one containing your x axis values) by another (the order column you brought in from the new data source).

Both hyperlinks contain additional documention directly from Microsoft. I hope you find this helpful!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors