Skip to content

Average of Total Sales & Total Transactions per Product

>> Download the sample (Power BI)

This sample compares the

(i) Avg. of Total Sales / Product, and
(ii) Avg. of Total Transactions / Product,

for a selection of products, compared with all products, by customer and over time.

Avg. of Total Sales per Product =
AVERAGEX ( VALUES ( Sales_Table[Product] ), [Total Sales] )

Avg. of Total Sales per Product (all Products)

Section titled “Avg. of Total Sales per Product (all Products)”
Avg. of Total Sales per Product (all Products) =
CALCULATE ( [Avg. of Total Sales per Product], ALL ( Products_Table ) )
Avg. of Total Transactions per Product =
AVERAGEX ( VALUES ( Products_Table[Products] ), [Total Transactions] )

Avg. of Total Transactions per Product (all Products)

Section titled “Avg. of Total Transactions per Product (all Products)”
Avg. of Total Transactions per Product (all Products) =
CALCULATE ( [Avg. of Total Transactions per Product], ALL ( Products_Table ) )
Total Sales =
SUMX ( Sales_Table, Sales_Table[Unit Price] * Sales_Table[Quantity] )
Total Transactions =
COUNTROWS ( Sales_Table )
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 )
)