>> Download the sample (Power BI)
This sample compares:
(i) Avg. of Total Sales / Customer, and (ii) Avg. of Total Transactions / Customer,
for a selection of customers, compared with all customers. Comparisons can be made both by product and across calendar time.
Dashboard - Snippet
Section titled “Dashboard - Snippet”
Data Model - Snippet
Section titled “Data Model - Snippet”
Measures - Sales
Section titled “Measures - Sales”Avg. of Total Sales per Customer
Section titled “Avg. of Total Sales per Customer”Avg. of Total Sales per Customer =AVERAGEX ( VALUES ( Sales_Table[Customer] ), [Total Sales] )Avg. of Total Sales per Customer (all Customers)
Section titled “Avg. of Total Sales per Customer (all Customers)”Avg. of Total Sales per Customer (all Customers) =CALCULATE ( [Avg. of Total Sales per Customer], ALL ( Customer_Table ) )Avg. of Total Transactions per Customer
Section titled “Avg. of Total Transactions per Customer”Avg. of Total Transactions per Customer =AVERAGEX ( VALUES ( Customer_Table[Customer] ), [Total Transactions] )Avg. of Total Transactions per Customer (all Customers)
Section titled “Avg. of Total Transactions per Customer (all Customers)”Avg. of Total Transactions per Customer (all Customers) =CALCULATE ( [Avg. of Total Transactions per Customer], ALL ( Customer_Table ) )Total Sales
Section titled “Total Sales”Total Sales =SUMX ( Sales_Table, Sales_Table[Unit Price] * Sales_Table[Quantity] )Total Transactions
Section titled “Total Transactions”Total Transactions =COUNTROWS ( Sales_Table )Tables
Section titled “Tables”Calendar_Table
Section titled “Calendar_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 ))