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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
GoncaloCare
Helper I
Helper I

Help with order data in chronological order

Hi guys.

Hope you can help me fix this issue I have (I hope there is a solution). And sorry for the long post and images.

 

GoncaloCare_0-1619476233241.png

 

So, I have a table with lots of data, and some columns are the ones above that have a month-year, year-quarter, rel-quarter, mat, etc etc. 

 

I wanted to be able to change the x-axis, so I duplicated the table, deleted the non important columns, and unpivoted the columns, like I have here.

GoncaloCare_1-1619476345780.png

Everything is fine here.

 

On the dashboard, I inserted the slicer here:

GoncaloCare_2-1619476387697.png

And, If I select "Rel-Quarter", everything works fine on the order:

GoncaloCare_3-1619476478908.png

 

But, if I select "Year-month name", the order doesn't work properly.

GoncaloCare_4-1619476510517.png

I can't order properly in a chronological order. I understand why, but is there any way to make it order in a chronological way?

 

Best regards to all!

3 REPLIES 3
amitchandak
Super User
Super User

@GoncaloCare , You also need to create a sort column for the value column and mark that as the sort column

https://docs.microsoft.com/en-us/power-bi/desktop-sort-by-column

How to Create Sort Column and Solve Related Errors: https://youtu.be/KK1zu4MBb-c

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Hi @amitchandak 

Thanks for your answer.

 

My problem is after tranformed, my table looks like this:

GoncaloCare_0-1619511421115.png

It has lots of indexes, attributes and values. How can I use sort in this case?

Hi @GoncaloCare ,

 

You need to create a  seperate sort table  that contains all distinct value from value column in your original table and a sort column by enter data and merge it with your original table. It is a little tricky. But I can't think of any other simple solution. You can refer to  https://radacad.com/sort-a-column-with-a-custom-order-in-power-bi

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Best Regards,

Dedmon Dai

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!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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