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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
sonam7
Microsoft Employee
Microsoft Employee

Sorting Column Header in Matrix using Direct Query

Hi All,

I am trying to sort my column header in matrix from ascending to descending in direct query mode. Since, I am using direct query it doesnt allow me to create index columns. Can someone please tell me a solution to this.

 

Matrix Column Header sort in Direct Query.PNG

 

For your reference, my column is in following format.

 

Matrix Column Header sort in Direct Query1.PNG

Thanks!

2 REPLIES 2
dax
Community Support
Community Support

Hi sonam7,

In your image,is tis yiour result? If so,  you have sort column by ascending already. Because you have set date format , 00:00:00 will be recognized as 12:00:00am and 12:00:00 will  be recognized  as 12:00:00 pm. so your image result is correct.

285.PNG

283.PNG

Best Regards,
Zoe Zhi

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

sonam7
Microsoft Employee
Microsoft Employee

Hi Zoe,

Yes, in my image it is sorted by ascending. However, I want it to be sorted by descending. Please see the image I am attaching below it shows that the date/time format is in ascending order.

Column Header Matrix Sorting.PNG

 

I would like to know how can I sort the date/time in descending order?

 

In Matrix sorting, I don't see the option to sort by column date/time

 

Column Header Matrix Sorting1.PNG 

 

Also, since I am working in direct query it doesn't allow me to sort using index columns. Please let me know how can I sort the date/time in descending?

 

Thanks!

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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