I have a situation and I can't figure out how to solve it. I hope you can help me.
My model looks like this:
Table PRODUCTS sample (there are duplicated values on column ProductId):
- each product has a total production cost (on column Total cost)
Table RAWMATERIALSHARE sample (there are also duplicated values on column ProductId):
Each ProductId is made out of several RawMaterials. The split of cost for a certain ProductId by each RawMaterialId is shown on column "RawMaterialShare":
I need to build a graph/chart showing the cost of each RawMaterialId by year
The result should be this:
Go to Solution.
@emilmaican, try a new measure as
sumx(Summarize(RAWMATERIALSHARE, RAWMATERIALSHARE [productid], RAWMATERIALSHARE[rawmaterialid], "_1", sum(PRODUCTS[TotalCost]) * sum(RAWMATERIALSHARE[rawmaterialshare)]),[_1])
Proud to be a Super User!
View solution in original post
Thanks for the quick answer. I understood the principle. It seems there is something missing in your formula and I'm trying to solve it.
I found the solution. Thank you:
CostByRawMaterial =SUMX (SUMMARIZE (RAWMATERIALSHARE,RAWMATERIALSHARE[productid],RAWMATERIALSHARE[rawmaterialid],"_1", SUM ( PRODUCTS[TotalCost] ) * SUM ( RawMaterialShare[RawMaterialShare] )),[_1])
Check out new user group experience and if you are a leader please create your group!
Check out how to claim yours today!
Test your skills now with the Cloud Skills Challenge.