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
Dellis81
Continued Contributor
Continued Contributor

reverse date hierachy

Hello!

 

I am wanting to reverse the normal order of columns (Dates) within matrix visual.  Traditionally I have used the date hierachy and really like those features.   Now, I am wanting to reverse the order that the hierachy returns.

I have been able to create a "reverse" sort column within the calendar table, and then sort year by this 'reverse year column".   I get the results I want when I only include the normal data field 'Year" within the matrix column well.   However, when I select the Hierachy Year column  - reverts back to the normal sort order.

IS there a way to create a date hierachy that allows for reversing dates (current date in left column, descending backwards in time
thank you!

6 REPLIES 6
v-yalanwu-msft
Community Support
Community Support

Hi, @Dellis81 ,

Did you download my file, try to get it right, or

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Ok, I have been able to get the reverse sort by columns if I exclude a dimension in the "row" well.  However - if I have a dimension in rows, then the matrix sort only allows sort by row.  

 

thank you!

Sample File:  https://drive.google.com/open?id=18K9LpI59NoWGwB9TZgFmUqvGzHAMOQX0&authuser=daryl.ellis01%40gmail.co...

Dellis81_0-1657028287698.png

Sample File:  https://drive.google.com/open?id=18K9LpI59NoWGwB9TZgFmUqvGzHAMOQX0&authuser=daryl.ellis01%40gmail.co...

 




v-yalanwu-msft
Community Support
Community Support

Hi, @Dellis81 ,
First you drill down to the bottom of the date, and then display it in descending order. No matter which layer you go back to at the moment, it's the reverse.

vyalanwumsft_1-1656481215360.png

 

vyalanwumsft_0-1656481186169.png


Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you for your response.   Your example is using the matrix sort by 'rows' feature.  I am looking for reverse sort within matrix columns.

amitchandak
Super User
Super User

@Dellis81 , Try if this can help. If not you have to create customer hierarchy with each column having a sort column

 

Date1 = [Date]

 

Sort Column = Rankx('Table', [Date],,desc,dense)

 

Mark sort column as column for date1 and use that

 

 

Or create year, month qtr etc 

 

Year1 = [Year]

 

Year Sort  = Rankx('Table', [Year],,desc,dense)

 

And create a hierarchy using such columns

Dellis81
Continued Contributor
Continued Contributor

Thank you for your response.   I have attempted several times on your suggestion.  I am able to creae a 'reverse date hierachy', but whenever I place this new hiearchy in in the column well - the order goes back to ascending.

If I was to put the Reverse Yr Column (not use hiearchy), then I get what I expect.  I suspect the hiearchy feature does not allow for the customized sort.  Do you know if that holds true in non date hiearchies?

Appreciate your help - sorry for slow response, I have tried off/on over the past few days - thinking I would eventually get it.  Your solution seems logical.  
Thank you!

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.