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
DagdasAlbag
Helper I
Helper I

Sorting in the crosstab (column 1)

Hello,

how do I get the sorting in column 1 (year 2021) descending in a crosstab?

The sorting refers to the total column, see Figure 2.

DagdasAlbag_0-1644575014822.png

DagdasAlbag_1-1644575383403.png

 

 

1 ACCEPTED SOLUTION

@DagdasAlbag  I meant like this, needing to create explicit measures for each year: 

 

AllisonKennedy_0-1644580966093.png

 


Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

View solution in original post

6 REPLIES 6
DagdasAlbag
Helper I
Helper I

Thank you for your answer!
Unfortunately, there is no solution to my question.

Sorry, I forgot there's no 'tooltip' fields for matrix and tables so the workaround I use for other visuals sorting doesn't work here. I've added another reply that is long but will work. 🙂 


Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

AllisonKennedy
Super User
Super User

@DagdasAlbag  You haven't provided a lot of detail, but if I understand correctly, you can add a measure or column to the tooltips and that will enable you to select it in the 'filters on this visual'. 

 

So add a measure for the value you want to sort by: 

 

2019 Measure = CALCULATE ( [Measure], DimDate[Date] = 2019) 


Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

DagdasAlbag_0-1644577258782.png

Unfortunately it did not work

@DagdasAlbag  I meant like this, needing to create explicit measures for each year: 

 

AllisonKennedy_0-1644580966093.png

 


Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

amitchandak
Super User
Super User

@DagdasAlbag , if you are using a  column in matrix, you can only sort on the grand total of values or on row column

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.