Forum Discussion

Jeanxyz's avatar
Jeanxyz
Icon for Power Participant rankPower Participant
3 years ago
Solved

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 vis...
  • v-henryk-mstf's avatar
    3 years ago

    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.

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


    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.