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

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

Reply
leamsi-alvarado
Regular Visitor

Multiply Measure and column, before sum

Hello, i need to multiply a measure with a column, the problem is that it sums first, and then it does de mutliplication, this is the dax code im currently using: 

Variance per volume= 'PBI_ASN_Volume_Budget'[Variance Budget] * sumx('PBI_ASN_Fixed_Cost', 'PBI_ASN_Fixed_Cost'[FixedCost])

here is an example of the problem:
variance budget is for row  with ID 1 = 50 and for row with ID 2 = 100, the i have in fixed cost the fixed cost for the ID 1 = 0.52 and for the ID 2 = 0.75, what ia want is  (50 * 0.52) + (100*0.75) =  101, and what the code is doing right now is (50+100) * (0.52 + 0.75) = 190.5

Any ideas, thank you!  
1 ACCEPTED SOLUTION
Anonymous
Not applicable

I would try it this way, 

 

Variance per volume = SUMX(
    'PBI_ASN_Fixed_Cost',
    'PBI_ASN_Fixed_Cost'[FixedCost] * 'PBI_ASN_Volume_Budget'[Variance Budget]
)

 

This could also help 

Variance per volume = SUMX(
    'PBI_ASN_Fixed_Cost',
    'PBI_ASN_Fixed_Cost'[FixedCost] * RELATED('PBI_ASN_Volume_Budget'[Variance Budget])
)

View solution in original post

6 REPLIES 6
parry2k
Super User
Super User

@Anonymous if that is the structure of the data which is very less likely, I will unpivot and then work on it, this is not the right shape of the data for the Power BI.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

Assuming the data is laid out like this: 

IDFixedID2Fixed2
50.52100.75



I used these measures: 

Multiply ID 1 and Fixed 1 = SUMX('Table', 'Table'[Fixed] * 'Table'[ID])
Multiply ID 2 and Fixed 2 = SUMX('Table', 'Table'[Fixed2] * 'Table'[ID2])
Add Values = SUMX('Table', [Multiply ID 1 and Fixed 1] + [Multiply ID 2 and Fixed 2])



parry2k
Super User
Super User

@leamsi-alvarado the solution @Anonymous  provided will work assuming there is a relationship between the tables, and also an important part is how these tables are related. Is it many to many or one to many relationship and which side is the one side?

 

Just having DAX will not do anything until there is a clear understanding of the relationship. My 2 cents.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

thank you!

Anonymous
Not applicable

I would try it this way, 

 

Variance per volume = SUMX(
    'PBI_ASN_Fixed_Cost',
    'PBI_ASN_Fixed_Cost'[FixedCost] * 'PBI_ASN_Volume_Budget'[Variance Budget]
)

 

This could also help 

Variance per volume = SUMX(
    'PBI_ASN_Fixed_Cost',
    'PBI_ASN_Fixed_Cost'[FixedCost] * RELATED('PBI_ASN_Volume_Budget'[Variance Budget])
)

This works perfectly, i needed to make a better relationship but the dax code worked, thank you!

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.

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.

Top Solution Authors