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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
MCacc
Helper IV
Helper IV

Switch measure on row matrix

Hello, 

 

is there any way I can switch measure based on which value I have in my rows header in a matrix visual? 

 

I have done it with columns but never with rows. 

 

The measure I wrote down is this:

MCacc_0-1698936727752.png

 

But once used in a matrix it shows no values.

 

Any idea why this happens?

 

Thanks

2 REPLIES 2
Anonymous
Not applicable

Hi @MCacc ,

 

I noticed that you said rows headers. You got multiple rows in your matrix, right?

For example,

vstephenmsft_0-1699343410132.png

For the above scenario, it is recommended that you try the field parameter.

Let report readers use field parameters to change visuals (preview) - Power BI | Microsoft Learn

 

 

If there is a single field in the matrix row, matching the values in the matrix row fields returns different measures. Then I also tested it on my side, and like @audreygerred , it was able to return the result correctly. Please provide more details. If you can, please provide some dummy data along with the desired results, presented in a tabular format.

 

Best Regards,

Stephen Tao

 

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

audreygerred
Super User
Super User

Hi! Give this a whirl

 

SWITCH = SWITCH(TRUE(),
SELECTEDVALUE('Product'[Category]) = "Bikes", [Order Quantity],
SELECTEDVALUE('Product'[Category]) = "Accessories", [Sales Amount])
 
It worked when I tried it out - in below left screenshot I have category in rows and the switch measure in values. For Accessories we are seeing the Sales Amount and for Bikes we are seeing the Order Quantity.
audreygerred_0-1698945258393.png

 

 




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.