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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
bilalkhokar73
Helper IV
Helper IV

Transaction date Sorting Desc to Asc In Matrix

I have Date column in Date table, I want that Latest ddate shoudl come firts and then followed by other dates
Let's say today is  17June2022 then 17june, 16 juen it should come like this in Power BI MATRIX

Resolution treid -In power query Created a column index column from 1 and made sorting by That Index column , after clsoing power query editor and checked Matrix but dates still shwoing old to new sorting 

bilalkhokar73_0-1655532513611.png

 

2. 

bilalkhokar73_1-1655532580557.png

 

3. 

bilalkhokar73_2-1655532613330.png


need help on this @AmitK 

1 ACCEPTED SOLUTION
speedramps
Super User
Super User

Hi bilalkhokar73

 

Delete your index and try this method instead.

 

In Power Query duplicate Date column and call it DateRevSort

 

Add a new custom column

DateRevSorter = Number.From([DateRevSort]) * -1

then change the format to a whole number

 

Then go into Modelling and click on the DateRevSort column, sort by DateRevSorter.

 

Thed hide the DateRevSorter field.

 

When you drag Date to a visual it will sort by Date

but when you DateRevSort to a visual it will sort by reverse Date i.e. most recent first !

 

Thanks for reaching out for help.

I have helped you, now please help me by giving kudos.

Remeber we are unpaid volunteers.

Click the thumbs up and accept as solution button. 

One question per ticket please. If you need to extend your request then please raise a new ticket.

You will get a quicker response and each volnteer solver will get the kudos they deserve. Thank you !

 

 

 

 

View solution in original post

7 REPLIES 7
speedramps
Super User
Super User

Thanks for accepting the solution.  Glad you learnt how to do it ok. Well done !

speedramps
Super User
Super User

Hi bilalkhokar73 

 

I am a volunteer and should not have to explain 3 times how to do the same thing  😀😀😀

Sorting the Power Query will not change the sort sequence of reports.

You need to config the column sort behavior in modelling.

 

You have not changed DateRevSorter to a Whole Number.  It it still showing as a ABC123 data type.

 

Also you have sorted the column in Power Query. Dont do that !

Go into Modelling and click on the DateRevSort column, sort by DateRevSorter.

When you drag Date to a visual it will sort by Date

but when you DateRevSort to a visual it will sort by reverse Date i.e. most recent first .

Ignore how the data is sorted in Power Query and look at the reports!

 

 

   

speedramps_0-1655553104139.png

😀

speedramps
Super User
Super User

Please read the instructions please ... 😀😀😀

 

In Power Query duplicate Date column and call it DateRevSort

 

Add a new custom column called DateRevSorter

= Number.From([DateRevSort]) * -1

then change the format to a whole number

 

Then go into Modelling and click on the DateRevSort column, sort by DateRevSorter.

 

Thed hide the DateRevSorter field.

 

When you drag Date to a visual it will sort by Date

but when you DateRevSort to a visual it will sort by reverse Date i.e. most recent first ! 

thank you done

speedramps
Super User
Super User

Hi bilalkhokar73

 

Delete your index and try this method instead.

 

In Power Query duplicate Date column and call it DateRevSort

 

Add a new custom column

DateRevSorter = Number.From([DateRevSort]) * -1

then change the format to a whole number

 

Then go into Modelling and click on the DateRevSort column, sort by DateRevSorter.

 

Thed hide the DateRevSorter field.

 

When you drag Date to a visual it will sort by Date

but when you DateRevSort to a visual it will sort by reverse Date i.e. most recent first !

 

Thanks for reaching out for help.

I have helped you, now please help me by giving kudos.

Remeber we are unpaid volunteers.

Click the thumbs up and accept as solution button. 

One question per ticket please. If you need to extend your request then please raise a new ticket.

You will get a quicker response and each volnteer solver will get the kudos they deserve. Thank you !

 

 

 

 

But still same 

 

bilalkhokar73_0-1655552110090.png

 

bilalkhokar73_1-1655552186158.png

 

DateRevSort  Seems that not inbuilt fnction, giving an error

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors