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
ilcaa72
Helper IV
Helper IV

Sort by Column Date in reverse order

i would like to sort the columns in reverse order, newest date first...i have a calculated measure that relies on the Date field, so changing the Column value to a Format(Str(Date), changes my calculated measure to 0.00

 

is there a way to sort the Date field in  columns in reverse order?

 

pBI date order.png

1 ACCEPTED SOLUTION

i ended up going to Power Query, grouping the Dates together. adding an Index to the individual dates, then expanding the 'table' for the group and selecting the columns to bring in, every distinct date got a distinct rank starting with latest date first...

View solution in original post

3 REPLIES 3
Greg_Deckler
Community Champion
Community Champion

What does your source data look like? Is that a Matrix visual? If that data is a single column that is in the Columns area of a matrix visualization, you could use a Sort By field to reverse sort it.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

 

THANKS, i was able to create a sort order by using the RANK function in Dax. It allows my most current date to have the 1 value and using DENSE option, gives each distinct Date value a rank, starting with newest date as 1 and working backwards...

 

NOW, i am trying to Sort my Date column by the new calculated column, BUT, i keep getting the message,  "This column cant be sorted... (see screenshot)" . i removed previous sort columns, Power Query doesnt have a sort for this column, how do i resolve. thanks

 

 pBI date order.png 

i ended up going to Power Query, grouping the Dates together. adding an Index to the individual dates, then expanding the 'table' for the group and selecting the columns to bring in, every distinct date got a distinct rank starting with latest date first...

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.