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

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

Reply
n_mayer
Frequent Visitor

How to multiply a measure with another table values?

Hi!

I have a table 1 like this, where all the columns are measures:

n_mayer_0-1720327339150.png

(its an example i created in excel bc of sensitive data)

 

A slicer like this:

n_mayer_1-1720327562829.png

 

And another table 2 like this:

n_mayer_2-1720327633379.png

(this one I get from live data)

 

If i select the Iphone X model in the slicer, I need to multiply the value of the table 1, "%Qty Local" column, "Battery" row, by the value of the table 2, on the Score column, "Iphone X" model and "Battery" commodity. 

     Example:

I select the "Iphone X" model on the slicer.

On the table 1 the value of the commodity "Processor" in the measure "% Qty Local" is 97.64%.

On the table 2 the score of the commodity "Processor" of the "Iphone X" is 3.

I want a function that allow me to show the value of (97.64% x 3= 2.93) and all the other values of the commodities of "Iphone X" like this:

n_mayer_3-1720328770992.png

 

Could anyone help me with this? (sorry for my grammar, English it's not my first language)

 

1 ACCEPTED SOLUTION
elitesmitpatel
Super User
Super User

1)Create a Measure to Retrieve the Selected Model from the Slicer

First, create a measure to get the selected model from the slicer.

 

measure =

SelectedModel = SELECTEDVALUE(Models[Model])

 

2) Create a Measure to Retrieve the Score from Table 2

Next, create a measure to get the score for the selected model and commodity from Table 2.

 

ScoreValue =
CALCULATE(
MAX(Scores[Score]),
Scores[Model] = [SelectedModel],
Scores[Commodity] = MAX(Table1[Commodity]) -- Assuming Table1 has a column named Commodity
)

 

3)Create a Measure to Perform the Multiplication

FinalValue =
VAR QtyLocal = MAX(Table1[%Qty Local]) / 100 -- Convert percentage to a decimal
VAR Score = [ScoreValue]
RETURN QtyLocal * Score

 

4) 

Create a Visual to Display the Results

Add a table or matrix visual to your report and add the commodity  column from Table 1 along with the  FinalValue measure. This will show the multiplied results for each commodity based on the selected model.

 

If you can't get the answer please share the PBIX file for reference.

 

View solution in original post

2 REPLIES 2
DataNinja777
Super User
Super User

Hi @n_mayer ,

 

You can produce your required output in the following way.  

1) Create measures to multiply the 'table 2'[scores] for the respective commodities by the local quantity % measure.

Processor =
SUMX (
    'table 2',
    IF (
        'table 2'[Commodity] = "Processor",
        [Score points]
            * CALCULATE ( [% Qty Local], KEEPFILTERS ( 'Table'[Commodity] = "Processor" ) )
    )
)

 

 

Battery =
SUMX (
    'table 2',
    IF (
        'table 2'[Commodity] = "Battery",
        [Score points]
            * CALCULATE ( [% Qty Local], KEEPFILTERS ( 'Table'[Commodity] = "Battery" ) )
    )
)

 

and so on... and combine those commodity multiplication measures in a single measure like below:

Commodity Local points =
[Battery] + [Processor] + [Memory] + [Screen] + [Speaker]

Then put that combined measure in a matrix visual next to the commodify field and apply the model slicer as shown below:

DataNinja777_0-1720337077878.png

 

You can confirm that the resultant output above is producing the same calculated result as your instruction.  

I attach an example pbix file.  

Best regards,

elitesmitpatel
Super User
Super User

1)Create a Measure to Retrieve the Selected Model from the Slicer

First, create a measure to get the selected model from the slicer.

 

measure =

SelectedModel = SELECTEDVALUE(Models[Model])

 

2) Create a Measure to Retrieve the Score from Table 2

Next, create a measure to get the score for the selected model and commodity from Table 2.

 

ScoreValue =
CALCULATE(
MAX(Scores[Score]),
Scores[Model] = [SelectedModel],
Scores[Commodity] = MAX(Table1[Commodity]) -- Assuming Table1 has a column named Commodity
)

 

3)Create a Measure to Perform the Multiplication

FinalValue =
VAR QtyLocal = MAX(Table1[%Qty Local]) / 100 -- Convert percentage to a decimal
VAR Score = [ScoreValue]
RETURN QtyLocal * Score

 

4) 

Create a Visual to Display the Results

Add a table or matrix visual to your report and add the commodity  column from Table 1 along with the  FinalValue measure. This will show the multiplied results for each commodity based on the selected model.

 

If you can't get the answer please share the PBIX file for reference.

 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.