>> Download the sample (Power BI)
This sample shows the first product a customer purchased, as determined by their first purchase date.
Dashboard - Snippet
Section titled “Dashboard - Snippet”
Data Model - Snippet
Section titled “Data Model - Snippet”
Measures - Product & Customer
Section titled “Measures - Product & Customer”First Product Purchased
Section titled “First Product Purchased”First Product Purchased =MAXX ( TOPN ( 1, SUMMARIZE ( Sales_Table, Calendar_Table[Date], Products_Table[Products] ), CALCULATE ( MIN ( Calendar_Table[Date] ) ), ASC ), Products_Table[Products])Total Sales
Section titled “Total Sales”Total Sales =SUMX ( Sales_Table, Sales_Table[Unit Price] * Sales_Table[Quantity] )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 ))