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
Syndicate_Admin
Administrator
Administrator

Incorrect total when multiplying columns

I've created a table where I show data from two tables.

Table 1: Name and price.

Table 2: Quantities.

So I'm left with a view: Name, quantities, price.

I have generated a new column that multiplies the quantities by the price using: Total = SUM('ps_product'[price])*SUM('ps_stock_available'[quantity])

I do well the multiplication, but in the total of the column I see an amount that has nothing to do with it. LLevo days going around, looking for forums and I can't find how to solve it. Can anyone help me? I've tried both SUM and SUMX

Captura de pantalla 2021-07-25 a las 19.18.01.png

1 ACCEPTED SOLUTION
Migasuke
Super User
Super User

Hi @Syndicate_Admin ,

This formula using sumx and related should solve your problem.
I have 2 tables. One with Price, second with Quantiy.

Migasuke_0-1627237450632.png

 


Take a look and let me know if it helped!



If my answer was helpful please give me a Kudos or even accept as a Solution.

Let's connect on LinkedIn!

View solution in original post

4 REPLIES 4
Migasuke
Super User
Super User

Hi @Syndicate_Admin ,

This formula using sumx and related should solve your problem.
I have 2 tables. One with Price, second with Quantiy.

Migasuke_0-1627237450632.png

 


Take a look and let me know if it helped!



If my answer was helpful please give me a Kudos or even accept as a Solution.

Let's connect on LinkedIn!

What if I have to multiply two measures?

 

Thanks Migasuke,
you have solved my issue I have spent half day trying to fix and googled myself to death, almost giving up.
My issue was a standard multiplication of Kilometers x emission factor = carbon created,
whereby the results was double the amount it should have been.
Your solution with SUMX & RELATED has fixed it.
LEGEND! Thanks again.

Yes, perfect, that's how it worked for me. Thank you so much!!!

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.