Forum Discussion
Multiplication Between Columns in the same table
- 4 years ago
kelly008 I think you mean you want to do something like that:
MEASURE = SUMX( 'RelProdOrderComponents', 'RelProdOrderComponents'[Expected_Quantity] * 'RelProdOrderComponents'[Unit_Cost]) )
Hi,
Sorry for the confusion, I was simply drawing out how the formula is going as per your request.
The total itself however is very very wrong.
What I want is for the Test 1 Formula to actually provide the correct total, the rows are correct just not the total at the bottom. If you do the calculation outside of PowerBI it should roughly be 6 million not 586 million.
kelly008 ok, try this:
MEASURE =
SUMX(
VALUES('RelProdOrderComponents'[Description]),
CALCULATE(SUM('RelProdOrderComponents'[Expected_Quantity]) *
CALCULATE(SUM('RelProdOrderComponents'[Unit_Cost]))
)
- kelly0084 years agoHelper I
Hi,
So this goes to the other method that I tried in 'Test2 CustomColumn' where it appears to get the total right but not the row data:
As you can see, the line with the red X is not calculating correctly, it should be doing 18 * £334.24 which is £6016.29 (If you look at the column TEST 1, you can see the correct row values) and not £1894.24.
- kelly0084 years agoHelper I
Hi, just to add on here, although there is a red tick next to the total, it still isnt right even though the number is more realistic than 600 million. Sorry if that confuses anything.
- SpartaBI4 years agoCommunity Champion
ok wait 🙂 in your visual, excpected qunatity and unit cost are implicit measures right? You just added the columns there, right? What is the summarization of these columns? SUM / AVERAGE / Something else?