Forum Discussion

Smackcat's avatar
Smackcat
Icon for Helper I rankHelper I
3 years ago
Solved

Order matrix columns by a column that exists on another table

Hi experts.   I have two tables:   Table1: Status Amount Nice 100 Bad 50   Table2: Name Status Maria Nice Mario Bad   I'm using Table2 to get a matrix, and I w...
  • v-yadongf-msft's avatar
    3 years ago

    Hi Smackcat ,

     

    I'm not sure the relationship between table 1 and table 2, but preferably there is a one to one relationship between them. So I add an index column into both tables.

     

    This is my test table 1:

     

    Table 2:

     

    Create a new column in table 2:

     

    Amount = LOOKUPVALUE('Table 1'[Amount],'Table 1'[Index],'Table 2'[Index])

     

     

    Sort ascending for amount column:

     

     

    Create a matrix and it will sort by amount column:

     

     

    Best regards,

    Yadong Fang

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