Forum Discussion

CJ-Flag's avatar
CJ-Flag
Frequent Visitor
2 years ago
Solved

How to Sort Columns in a Matrix Visual

Hello,   I currently have - hopefully - a small challenge. My matrix visual is defined to be sorted by rows. Now I have a field that names the columns from another table where the values are summed...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi CJ-Flag ,

     

    If you are trying to sort the columns based on the following total value.

     


    1. first you can create a calculated column to get the total value.

    Column =
    CALCULATE (
    SUM ( financials[ Sales] ),
    FILTER (
    ALL ( financials ),
    'financials'[Month Name] = EARLIER ( 'financials'[Month Name] )
    )
    )

     

    2. Then create a calculation table and create a one-to-many relationship with the original table.

    Table =
    SUMMARIZE('financials','financials'[Month Name],'financials'[Column])
    
    

     

    3. Make the month name column in the calculation table sorted according to the column column.

     

    4. Place the corresponding fields in the matrix.

     

    If your Current Period does not refer to this, please clarify in a follow-up reply.

     

    Best Regards,

    Clara Gong

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