Forum Discussion
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.
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.
Everything is fine here.
On the dashboard, I inserted the slicer here:
And, If I select "Rel-Quarter", everything works fine on the order:
But, if I select "Year-month name", the order doesn't work properly.
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
- amitchandak
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
- GoncaloCare
Helper I
Hi amitchandak
Thanks for your answer.
My problem is after tranformed, my table looks like this:
It has lots of indexes, attributes and values. How can I use sort in this case?
- v-deddai1-msft
Community Support
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