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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
taherelshafei
New Member

Multiplying a measure in table A by a column value in table B

I have three tables (Product, Product Movement, Product Factor).

Product Movement has a measure called "Total Product Out", Product Factor has a calculated column called "Product Factor".

What i need to do is to create a measure "Weighted Product Out", which equals Total Product Out * Product Factor (Of course each respective to the Product itself).

How can i achieve this?

6 REPLIES 6
v-henryk-mstf
Community Support
Community Support

Hi @taherelshafei ,

 

Directly passing the measure*calculated column method will cause calculation logic errors. We are unable to do further testing for you at the moment, and hope to provide testing data (delete sensitive information) and clear requirements.

 

How to Get Your Question Answered Quickly - Microsoft Power BI Community


Looking forward to your reply.


Best Regards,
Henry

 

taherelshafei
New Member

Thanks a lot for your help. 

Product table has an active one to many relationship with ProductMovement and ProductFactor (via ProductID).

 

I tried your suggestion, but RELATED wouldn't accept ProductFactor[ProductFactor], it doesn't even suggest any column. Not sure what i'm doing wrong.

HI @taherelshafei ,

 

Can you share some screenshots for your data model in Power BI please, along with the DAX you have written.

Please make sure your query has relevant details. refer the blog below: https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

 

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

So here is the Model (table names are slightly different than the ones i used in the initial question, not to get confused).

Screen Shot 2021-08-10 at 6.02.27 PM.png

 

 

Here is my calculated column on the ProductContraceptiveFactor Table:

Screen Shot 2021-08-10 at 6.05.36 PM.png

Here is my initial measure

 

Screen Shot 2021-08-10 at 6.09.35 PM.png

Here is a table to visualize the data:

Screen Shot 2021-08-10 at 6.01.04 PM.png

 However, my approach failed, you can lool at the "Achieved Protection" total. 

I just realized i missed the measure i created to transfer the Calculated Column to a measure.

Screen Shot 2021-08-10 at 6.14.05 PM.png

Pragati11
Super User
Super User

HI @taherelshafei ,

 

What relationships have you got among these tables?

https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

 

If there are appropriate relatioships in your tables, you can directly write a simple DAX calculation:

newCalc = [yourMeasure] * RELATED(yourTable[columnname])

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.