Skip to content

Average Sales, Profits, and Profit Margins per Transaction

>> Download the sample (Power BI)

This sample shows the average of:

(i) Total Sales,
(ii) Total Profits, and
(iii) Profit Margins

per sales transaction, across different products and customers, and by calendar time (year and quarter).

Average Profit Margin / Transaction =
DIVIDE([Average Profits / Transaction], [Average Sales / Transaction], 0)
Average Profits / Transaction =
AVERAGEX(VALUES(Sales_Table[Order ID]),[Total Profits])
Average Sales / Transaction =
AVERAGEX(VALUES(Sales_Table[Order ID]),[Total Sales])
Total Costs =
SUMX ( Sales_Table, Sales_Table[Unit Cost] * Sales_Table[Quantity] )
Total Profits =
[Total Sales] - [Total Costs]
Total Sales =
SUMX ( Sales_Table, Sales_Table[Unit Price] * Sales_Table[Quantity] )
Calendar_Table =
GENERATE (
CALENDAR ( DATE ( 2017, 1, 1 ), DATE ( 2019, 12, 31 ) ),
VAR currentDay = [Date]
VAR Day =
DAY ( currentDay )
VAR Month =
MONTH ( currentDay )
VAR Year =
YEAR ( currentDay )
RETURN
ROW ( "Day", day, "Month", month, "Year", year )
)
Average Product Profit Margin =
DIVIDE ( [Total Profits], [Total Sales], 0 )