Forum Discussion

Oconnd02's avatar
Oconnd02
Regular Visitor
7 years ago
Solved

Custom sort in matrix table

HI All    I am looking for help in custom sorting in the matrix table in order to set up a BI P&L report. Due to the nature of my core data I had to unpiviot columns in order to get long clean data...
  • Anonymous's avatar
    Anonymous
    7 years ago

    The way I would be doing it is to get it into the same table, either by merging or if your list is fixed you could simply write a quick SWITCH statement to create a new column on your main table.

    Order by = SWITCH( 'table'[variable],
    "Sum of Total HLS", 1,
    "Sum of List_Price", 2,
    "Sum of Excise", 3......)

    then use the 'sort by' to simply influence the order.