Forum Discussion
% Margin between rows
I guess I wasnt clear enough.
For each distinct project I want to do the following calculation.
(Sales Calculation of the labour cost -(minus) Forecast calculation of the labour cost) /(divided by) Sales calculation of the labour cost.
This will give me the sales margin and the same calculation goes for Production calculation.
Are the forecasted values stored in the same table snippet you originally showed? Can you share an actual slice of your data table and I can mock this up in Power Bi?
1. Labour Cost := SUMX ( Table1, [Labour Cost] )
2. Forecast Labour := SUMX ( Table1, [Forecast Labour] ) ** Unsure of your actual column name for forecasted labour
3. Sales Margin := DIVIDE ( [Labour Cost] - [Forecast Labour], [Labour Cost] )
4. If you are using the [Sales Margin] value in a visualization, you can apply this measure over a visual filtered by the 'Project' column. This would give you the total 'Sales Margin' for the Project 1, 2, 3, etc.