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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
RashmitaR
Helper IV
Helper IV

How can I change the value in a matrix to change according to the filter selected

HI , In my model I have the following columns: *Country *Products *cost price *selling price following measures: *profit *profit% In my report I have a matrix with rows as Country and Products and values as Profit and Profit%. But I want to create a slicer where in my client can choose where he wants to have a look at Profit or Profit% and accordingly in the matrix only profit or profit% or both will be visible . (Kindly note: Profit and Profit % cannot be changed to columns as in the actual model they are measures which is used to display a number of other measures from a different table)
1 ACCEPTED SOLUTION
v-ljerr-msft
Microsoft Employee
Microsoft Employee

Hi @RashmitaR,

 

According to your description above, you should be able to follow steps below to get your expected result.Smiley Happy

 

1. Add a new table with a single column of measure type to your model like below.

Type
profit
profit%

2. Create a new measure to show "profit" and "profit%" according to measure type.

Measure =
SWITCH (
    FIRSTNONBLANK ( NewType[Type], 1 ),
    "profit", [profit],
    "profit%", [profit%],
    BLANK ()
)

3. Add a Matrix to report with Rows as Country and Products and Values as the new created measure, Columns as measure Type from the new created table.

r3.PNG

 

Regards

View solution in original post

1 REPLY 1
v-ljerr-msft
Microsoft Employee
Microsoft Employee

Hi @RashmitaR,

 

According to your description above, you should be able to follow steps below to get your expected result.Smiley Happy

 

1. Add a new table with a single column of measure type to your model like below.

Type
profit
profit%

2. Create a new measure to show "profit" and "profit%" according to measure type.

Measure =
SWITCH (
    FIRSTNONBLANK ( NewType[Type], 1 ),
    "profit", [profit],
    "profit%", [profit%],
    BLANK ()
)

3. Add a Matrix to report with Rows as Country and Products and Values as the new created measure, Columns as measure Type from the new created table.

r3.PNG

 

Regards

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.

Top Solution Authors
Top Kudoed Authors