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

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.

Reply
Keltea
Frequent Visitor

Sort Date Column ascending in a matrix

I have a matix week ending periods in the columns. I would like to sort in the descending order to show the latest date first. In the example below, I would like to see 05/09/20 on the left. I have searched this site but I did not see a solution.

 

Power BI Help2.png

 Thanks in advance for your help

1 ACCEPTED SOLUTION

Ok, Columns are tricky. You'll need to create a reverse index as this article states.

 

In your date table in Power Query, you'd do this:

  1. Sort your date table in descending order by date (Newest date at the top)
  2. Add an index column
  3. Re-sort the date table in ascending order.

Now sort your date by the index.

 

Note that will affect all visuals. You may want to create a duplicate date column in your date table for a descending sort, the use that date column in your matrix, and sort it by the Index column, and leave your original date coluimn alone. That will also make filtering on the date column easier as a Sort By affects filtering.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

View solution in original post

3 REPLIES 3
edhans
Super User
Super User

Click on the elipses in the matrix visual then select the Sort By option. 

 

Select it again and the Ascending/Descending options will show up.

 

2020-05-21 10_22_12-Issue - Power BI Desktop.png



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting
Keltea
Frequent Visitor

Does not work - date is not an option.Power BI Help3.png

 

Ok, Columns are tricky. You'll need to create a reverse index as this article states.

 

In your date table in Power Query, you'd do this:

  1. Sort your date table in descending order by date (Newest date at the top)
  2. Add an index column
  3. Re-sort the date table in ascending order.

Now sort your date by the index.

 

Note that will affect all visuals. You may want to create a duplicate date column in your date table for a descending sort, the use that date column in your matrix, and sort it by the Index column, and leave your original date coluimn alone. That will also make filtering on the date column easier as a Sort By affects filtering.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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