Forum Discussion

benlynch225's avatar
benlynch225
Frequent Visitor
3 years ago
Solved

Sorting a matrix with multiple measures in row groups

Hi all, I don't know if this is possible but I am trying to find a way to row a matrix that currently only consists of 6 measures added to the Values part of a Matrix. There are no rows or columns added to the visual. I turned on the setting to "switch values to row groups rather than columns" so the data would appear in a table format. 

Here's what the matrix looks like:

Current Plan200
Last 2 Weeks Actuals300
Last 4 Weeks Actuals600
Year to Date Actuals1000
Prev Year Actuals1200
What If Scenario500

 

I would like to sort this matrix by the measures that are in the visual. I tried creating a virtual table using the UNION function and adding each measure as a new ROW, but that did not work. 


Here's what I would like it to look like:

Prev Year Actuals1200
Year to Date Actuals1000
Last 4 Weeks Actuals600
What If Scenario500
Last 2 Weeks Actuals300
Current Plan200

 

Any ideas would be very much appreciated!

  • Hi, benlynch225 ;

    You could enter a table such as:

    then create a measure.

    Measure = SWITCH(MAX('Table (2)'[Name]),
     "Current Plan",[Current Plan],
     "Last 2 Weeks Actuals",[Last 2 Weeks Actuals],
     "What If Scenario",[What If Scenario],
     "Prev Year Actuals",[Prev Year Actuals])

    the final show:


    Best Regards,
    Community Support Team _ Yalan Wu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

3 Replies

  • You should be able to sort this by the same order that you put the measures into the Values well. 

  • v-yalanwu-msft's avatar
    v-yalanwu-msft
    Community Support

    Hi, benlynch225 ;

    You could enter a table such as:

    then create a measure.

    Measure = SWITCH(MAX('Table (2)'[Name]),
     "Current Plan",[Current Plan],
     "Last 2 Weeks Actuals",[Last 2 Weeks Actuals],
     "What If Scenario",[What If Scenario],
     "Prev Year Actuals",[Prev Year Actuals])

    the final show:


    Best Regards,
    Community Support Team _ Yalan Wu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.