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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Yasir_Butt
New Member

I want to sort in my desired way in matrix visual, data is fetch using direct query. How can i do?

I am trying to sort the data according to my preference, and am fetching the data using direct query, but in visual its sorting it in alphabetic manner instead of my desired manner or as its saved in DB. Additionally i added a column with serial/index number so i can sort the data using that column but i dont want that index column values to be appear in matrix visual but cant

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Yasir_Butt ,

 

You can use sort by column and you can check the following results:

vtianyichmsft_0-1715742312602.png

vtianyichmsft_1-1715742340998.png

vtianyichmsft_2-1715742362885.png

Sort one column by another column in Power BI - Power BI | Microsoft Learn

 

Hope it helps!

 

Best regards,
Community Support Team_ Scott Chang

 

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

5 REPLIES 5
Anonymous
Not applicable

Hi @Yasir_Butt ,

 

You can use sort by column and you can check the following results:

vtianyichmsft_0-1715742312602.png

vtianyichmsft_1-1715742340998.png

vtianyichmsft_2-1715742362885.png

Sort one column by another column in Power BI - Power BI | Microsoft Learn

 

Hope it helps!

 

Best regards,
Community Support Team_ Scott Chang

 

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

 

 

 

 

Yasir_Butt
New Member

Did not work, i tried this filter option already, actually i want the data to be showed using that column values but those value to be disappear, only want it to be use for sorting not appear in visual. 

Yasir_Butt
New Member

Thank you for responding, but it does not work with my issue, i am fetching data using direct query, and i want data to be sort the way i want it. but it sort in alphabetic order. Attaching images for your understanding, excel flow is what i want to replicate in BI matrix, but its not working, or suggest me how can i hide column added in matrix row, as i use index column so that data sort using number but they appear in visual but i just want them to help in sorting not appear in visual. Got stuck in both ways, unable to achieve desired view yet.2.jpgdesired order.jpg

hi @Yasir_Butt 

You can hide the blank values or remove unwanted values using visual filter.

Uzi2019_0-1715672962282.png

 

 

I hope it works for you!

 

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!
Uzi2019
Super User
Super User

Hi @Yasir_Butt 

I dont know your scenario but still you can try below post for reference. 

https://community.fabric.microsoft.com/t5/Desktop/Sorting-a-text-column-using-Direct-Query/m-p/46283...

 

I hope it may solves your issue!

 

 

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.