>> Download the sample (Power BI)
This sample shows the number and percentage of customers who have purchased a particular product more than once.
Dashboard - Snippet
Section titled “Dashboard - Snippet”
Data Model - Snippet
Section titled “Data Model - Snippet”
Measures - Product & Customer
Section titled “Measures - Product & Customer”% of Customers who bought a particular Product more than once
Section titled “% of Customers who bought a particular Product more than once”% of Customers who bought a particular Product more than once =AVERAGEX ( Products_Table, DIVIDE ( [No. of Customers w/Multiple Purchases of the same Product], [No. of Distinct Customers], 0 ))No. of Customers w/Multiple Purchases of the same Product
Section titled “No. of Customers w/Multiple Purchases of the same Product”No. of Customers w/Multiple Purchases of the same Product =COUNTROWS ( FILTER ( SUMMARIZE ( Sales_Table, Customer_Table[Customer], "Total Purchases", COUNTROWS ( Sales_Table ) ), [Total Purchases] >= 2 ))No. of Distinct Customers
Section titled “No. of Distinct Customers”No. of Distinct Customers =DISTINCTCOUNT ( Sales_Table[Customer] )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 ))