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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Jeanxyz
Post Prodigy
Post Prodigy

how to sort columns in a matrix visual

I have a matrix, the columns are entity names from dim_entity table. I have sorted the entities column by another colmnn called "rank order" in my dim_entity table. 

For some reason, the matrix visual is showing entities by descending "rank order" , how can I change the sorting to ascending order?

 

sort columns in a table.png

1 ACCEPTED SOLUTION
v-henryk-mstf
Community Support
Community Support

Hi @Jeanxyz ,

 

According to your description, if you want to sort the columns in the matrix based on rank, you need to put the rank into the matrix; otherwise it is sorted based on the value against row or value.

vhenrykmstf_0-1664777443780.png

Amount_filter = sum(FactInternetSales[SalesAmount])
Rank =
IF (
    HASONEVALUE ( DimProduct[Color] ),
    RANKX ( ALLSELECTED ( DimProduct[Color] ), [Amount_filter] ),
    BLANK ()
)

vhenrykmstf_1-1664777477032.png

vhenrykmstf_2-1664777496693.png


If the problem is still not resolved, please provide detailed error information and test data. Looking forward to your reply.


Best Regards,
Henry


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-henryk-mstf
Community Support
Community Support

Hi @Jeanxyz ,

 

According to your description, if you want to sort the columns in the matrix based on rank, you need to put the rank into the matrix; otherwise it is sorted based on the value against row or value.

vhenrykmstf_0-1664777443780.png

Amount_filter = sum(FactInternetSales[SalesAmount])
Rank =
IF (
    HASONEVALUE ( DimProduct[Color] ),
    RANKX ( ALLSELECTED ( DimProduct[Color] ), [Amount_filter] ),
    BLANK ()
)

vhenrykmstf_1-1664777477032.png

vhenrykmstf_2-1664777496693.png


If the problem is still not resolved, please provide detailed error information and test data. Looking forward to your reply.


Best Regards,
Henry


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

lbendlin
Super User
Super User

Please provide sanitized sample data that fully covers your issue.
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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