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

Sorting date in column in table visual

Hi guys! 

I am working on building table visual on Power BI which has values by date like the example.

However, the date is showing in oldest to newest order, which I want to flip it back to newest to oldest. 

I don't see the sorting option when I hover around the column. So, I would love experts' comments on this to solve this issue.

MinCK_0-1737748767949.png

 

1 ACCEPTED SOLUTION
Fowmy
Super User
Super User

@MinCK 

Power BI doesn't allow you to sort the column in a matrix viz, following work around should work for you. 

I added a new column in Power Query to rank the date column in descending order witch later will be used to sort the date column when loaded to Power BI using sort by column.

New  rank column in Powr Query:

= Table.AddRankColumn(#"Renamed Columns", "DateOrder" ,  { "Date", Order.Descending })


Apply Sort by column:

Fowmy_0-1737753593119.png


You get the dates sorted in decending order:

Fowmy_1-1737753631591.png

 

Note: whereever you use this date column, the order will be decesnding. You may duplicate the date column and use only for this viz if no other modeling concerns arise. 

 









Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

6 REPLIES 6
Fowmy
Super User
Super User

@MinCK 

Power BI doesn't allow you to sort the column in a matrix viz, following work around should work for you. 

I added a new column in Power Query to rank the date column in descending order witch later will be used to sort the date column when loaded to Power BI using sort by column.

New  rank column in Powr Query:

= Table.AddRankColumn(#"Renamed Columns", "DateOrder" ,  { "Date", Order.Descending })


Apply Sort by column:

Fowmy_0-1737753593119.png


You get the dates sorted in decending order:

Fowmy_1-1737753631591.png

 

Note: whereever you use this date column, the order will be decesnding. You may duplicate the date column and use only for this viz if no other modeling concerns arise. 

 









Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

bchager
Super User
Super User

@MinCK It sounds like you can benefit from adding a sort column to your table, sorted ascending, then sorting your effective date by that column.

 

MinCK
Frequent Visitor

Thank you @bchager for the fast reply, do you mean adding a sort column in the semantic model? I tried using other column to sort it. However, it has no option for me to adjust the ascending or descending order. Or do you think I should create another column specfically for sorting this?

MinCK_4-1737752958154.png

 

@MinCK You could create another column to sort the effective date column on. Are the effective dates contiguous, or can the same date be on more than 1 row?

 

ToddChitt
Super User
Super User

Click the ellipsis in the upper right corner of your Matrix visual. There you should be able to sort Descending or Ascending, yes?




Did I answer your question? If so, mark my post as a solution. Also consider helping someone else in the forums!

Proud to be a Super User!





Hi @ToddChitt, thank you for your reply. I am trying to find that too but it doesn't show on my end. The matrix allows me to sort by any row, but not the column itself. I don't mind sorting by any row, what I want is to just sort the date column from to show the latest first not the oldest. 

 

MinCK_0-1737752659832.png

MinCK_3-1737752835094.png

 

 

Helpful resources

Announcements
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!

Jan NL Carousel

Fabric Community Update - January 2025

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