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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Jeanxyz
Impactful Individual
Impactful Individual

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

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

August Carousel

Fabric Community Update - August 2024

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