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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Feb2025 NL Carousel

Fabric Community Update - February 2025

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