Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
benlynch225
Frequent Visitor

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!

1 ACCEPTED SOLUTION
v-yalanwu-msft
Community Support
Community Support

Hi, @benlynch225 ;

You could enter a table such as:

vyalanwumsft_0-1664773310931.png

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:

vyalanwumsft_1-1664773683684.png


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.

View solution in original post

3 REPLIES 3
v-yalanwu-msft
Community Support
Community Support

Hi, @benlynch225 ;

You could enter a table such as:

vyalanwumsft_0-1664773310931.png

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:

vyalanwumsft_1-1664773683684.png


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.

This is perfect - thank you very much!

lbendlin
Super User
Super User

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

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.