Skip to content

Average number of unique products bought each Quarter, by each Customer

>> Download the sample (Power BI)

This sample shows the average number of unique products bought each quarter, by each customer.

Avg. Unique Products Bought every Quarter =
AVERAGEX ( VALUES ( Calendar_Table[Quarter & Year] ), [Unique Products Bought] )

Avg. Unique Products Bought every Quarter across All Years

Section titled “Avg. Unique Products Bought every Quarter across All Years”
Avg. Unique Products Bought every Quarter across All Years =
CALCULATE (
[Avg. Unique Products Bought every Quarter],
ALL ( Calendar_Table )
)
Unique Products Bought =
DISTINCTCOUNT(Sales_Table[Product])
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 )
)