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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.