Quantcast
Channel: Desktop topics
Viewing all articles
Browse latest Browse all 217069

Percentage of subtotal

$
0
0

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 batchDepartmentProductCost of MaterialCost of Machine
1CuttingA1215
1AssemblyA1110
2CuttingA1410
2AssemblyA1612

 

What i need is a result like this (I need to compute the percentages):

ProductionDepartmentProductCost of Material%Cost of MaterialCost of Machine%Cost of MachineTotal Cost% of Total Cost
1CuttingA1252%1560%2756%
1AssemblyA1148%1040%2144%
   23100%25100%48100%

 

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?


Viewing all articles
Browse latest Browse all 217069

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>