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
HenryJS
Post Prodigy
Post Prodigy

Reversing Date Axis Matrix

Hi all,

 

Is it possible to sort date axis in a matrix from newest to oldest?

 

 

 

 

Capture.PNG

1 ACCEPTED SOLUTION
v-eqin-msft
Community Support
Community Support

Hi @HenryJS ,

For my test ,  to avoid "circle", you could creata a new table using the following formula:

Table 2 =
SUMMARIZE (
    'Table',
    'Table'[Date],
    'Table'[Type],
    'Table'[Value],
    "index", RANKX ( ALL ( 'Table' ), 'Table'[Date],, DESC )
)

Then  select Date column ,sort by Index column, so that  dates in calculated table could be in descending order in Matrix 

10.21.5.2.png

10.21.5.1.PNG

Here is the pbix file.

 

Did I answer your question ? Please mark my reply as solution. Thank you very much.
If not, please upload some insensitive data samples and expected output.

Best Regards,
Eyelyn Qin

View solution in original post

3 REPLIES 3
v-eqin-msft
Community Support
Community Support

Hi @HenryJS ,

For my test ,  to avoid "circle", you could creata a new table using the following formula:

Table 2 =
SUMMARIZE (
    'Table',
    'Table'[Date],
    'Table'[Type],
    'Table'[Value],
    "index", RANKX ( ALL ( 'Table' ), 'Table'[Date],, DESC )
)

Then  select Date column ,sort by Index column, so that  dates in calculated table could be in descending order in Matrix 

10.21.5.2.png

10.21.5.1.PNG

Here is the pbix file.

 

Did I answer your question ? Please mark my reply as solution. Thank you very much.
If not, please upload some insensitive data samples and expected output.

Best Regards,
Eyelyn Qin

Anonymous
Not applicable

@HenryJS  you will have to create a index colum in Power query editor for the sorting to work


index1.png
sort the column based on Index number



index2.png
The expected result are as below

index3.png

Hope it resolves your issue? Please consider accepting it as the solution to help the other members find it more quickly.


Appreciate your Kudos, Press the thumbs up button!!👍



@Anonymous the 'week ending' column I am trying to do the sort to is in a DAX table. Is it possible to do for a column like this?

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.