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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Landmann
Regular Visitor

How can I sort the data on my graph?

Hello everybody!

 

I am currently trying to sort the data on my graph (on the x-axis) in a certain way but it doesn't seem to work.

 

Currently my graphs show data like this (x-axis):

 

01, 02, 03, ..., 12, CF02, CY17, Target

 

But I want them do be displayed in this order:

 

CY17, 01, 02, ..., 12, Target, CF02

 

So I created a new table, assigned a number to each value and created a relationship to my basedata. Then I used "related" function in my basedata to assign the numbers to the respective entry.

 

However, this is what BI does:

 

BI.PNG

 

Can somebody tell me why it doesn't work? I looked this approach up on the internet and it should work like this...

 

Thank you for your help!

 

 

 

1 ACCEPTED SOLUTION
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Landmann,

 

May be you could try this way without creating a new table. By the steps below you could get your expected order.

 

Capture.PNG

 

1. Go to Query Editor, add a conditional column.

 

add column.PNG

 

2. Apply && Close. Go to Data View and select column1 sort by custom column, then you could create the visual.

 

sort by.png

 

Hope this can help you!

 

Best Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Landmann,

 

May be you could try this way without creating a new table. By the steps below you could get your expected order.

 

Capture.PNG

 

1. Go to Query Editor, add a conditional column.

 

add column.PNG

 

2. Apply && Close. Go to Data View and select column1 sort by custom column, then you could create the visual.

 

sort by.png

 

Hope this can help you!

 

Best Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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