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
sompolk
Frequent Visitor

power bi sort multiple columns in data view problem

I have problem about sorting multiple column in data view.
Data source I get from excel have many cloumn; column1 is date, column 3 is plant name.  In Query data is first order by column plant name and second by column date as shown below.

01.jpg

After I close and apply to Data View, The order of data in column date and plant name changed. How can i sort data in multiple column; first level I need sort data in column plant name ASC  and second level sort data in column date ASC.

02.jpg03.jpg04.jpg05.jpg06.jpg07.jpg

3 ACCEPTED SOLUTIONS
aj1973
Community Champion
Community Champion

Hi @sompolk

This can help you solve your issue

https://www.sqlbi.com/articles/rankx-on-multiple-columns-with-dax-and-power-bi/

 

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

View solution in original post

v-henryk-mstf
Community Support
Community Support


Hi @sompolk ,

 

If you arrange multiple columns in power query and want to save the arranged results. May wish to create an index after the arrangement. After "close and apply", add an index column to the table to display the latest sort results. But in desktop, only one column can be sorted.

 

There is also a type of case for reference:Solved: Sorting a table using multiple columns - Microsoft Power BI Community

 

If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


Best Regards,
Henry


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

4 REPLIES 4
v-henryk-mstf
Community Support
Community Support


Hi @sompolk ,

 

If you arrange multiple columns in power query and want to save the arranged results. May wish to create an index after the arrangement. After "close and apply", add an index column to the table to display the latest sort results. But in desktop, only one column can be sorted.

 

There is also a type of case for reference:Solved: Sorting a table using multiple columns - Microsoft Power BI Community

 

If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


Best Regards,
Henry


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

Thanks henry

aj1973
Community Champion
Community Champion

Hi @sompolk

This can help you solve your issue

https://www.sqlbi.com/articles/rankx-on-multiple-columns-with-dax-and-power-bi/

 

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

thanks Amine Jerbi

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