Forum Discussion
% Margin between rows
Is the graphic below an accurate representation of your data table? If so, you have a few options, but I would start by creating a MEASURE using SUMX and using that MEASURE in a CALCULATE function and use a FILTER to apply our measure to the Project you are working.
1. Total Sales := SUMX ( Table1, Table1[Labour cost] + Table1[Machining Cost] + Table1[Material Cost] )
2. Total Sales by Project :=
CALCULATE (
[Total Sales],
Table1[Project] = "Project 1"
)
I am not 100% what the Production % calculation needs to be, but I would assume (Labour cost + Machining Cost) / Total Sales, if so:
3. Production Cost := SUMX ( Table1, Table1[Labour cost] + Table1[Machining Cost] )
4. Production Percentage := DIVIDE ( [Production Cost], [Total Sales] )
5. Production % by Project :=
CALCULATE (
[Production Percentage],
Table1[Project] = "Project 1"
)