Hi all,
I'm stuck with a DAX-formula and I hope you guys can help me out. I tried the formulas I already found in a related topic, but it doesn't seem to be applicable in my case. Lets say I have the fallowing data available:
Production batch | Department | Product | Cost of Material | Cost of Machine |
1 | Cutting | A | 12 | 15 |
1 | Assembly | A | 11 | 10 |
2 | Cutting | A | 14 | 10 |
2 | Assembly | A | 16 | 12 |
What i need is a result like this (I need to compute the percentages):
Production | Department | Product | Cost of Material | %Cost of Material | Cost of Machine | %Cost of Machine | Total Cost | % of Total Cost |
1 | Cutting | A | 12 | 52% | 15 | 60% | 27 | 56% |
1 | Assembly | A | 11 | 48% | 10 | 40% | 21 | 44% |
23 | 100% | 25 | 100% | 48 | 100% |
What i tried was to build a measure like:
Total Cost of Material = sum(table[cost of Material])
and then i thought i could do something like this:
%Cost of Material=
divide (
sum(table[Cost of Material]); // I also tried the measure "Total Cost of Material
sumx(all(table),[Cost of Material]);
0)
But I cant use [Cost of Material] it want me to use a measure.
Can someone help me out?