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]) )
by your latest picture you want the total to be equal to:
10270 * 5713009 = 586672602430 ?
Cause that what you get in the original post and said it's not what you want.
You will get this with indeed what you wrote in the beginning:
TEST1 = SUM('RelProdOrderComponents'[Expected_Quantity]) * SUM('RelProdOrderComponents'[Unit_Cost])
What am I missing here? I guess I still just don't understand what you want to get haha
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.
- SpartaBI4 years agoCommunity Champion
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.