>> Download the sample (Power BI)
This sample shows the sales of the top-selling and bottom-selling product for each customer.
Dashboard - Snippet
Section titled “Dashboard - Snippet”
Data Model - Snippet
Section titled “Data Model - Snippet”
Measures - Sales, Customer, & Product
Section titled “Measures - Sales, Customer, & Product”Sales Bottom 1 Product
Section titled “Sales Bottom 1 Product”Sales Bottom 1 Product =CALCULATE ( [SUMX Total Sales], TOPN ( 1, VALUES ( Sales_Table[Product] ), [SUMX Total Sales], ASC ))Sales Top 1 Product
Section titled “Sales Top 1 Product”Sales Top 1 Product =CALCULATE ( [SUMX Total Sales], TOPN ( 1, VALUES ( Sales_Table[Product] ), [SUMX Total Sales], DESC ))SUMX Total Sales
Section titled “SUMX Total Sales”SUMX Total Sales =SUMX ( Sales_Table, Sales_Table[Quantity] * Sales_Table[Unit Price] )Total Products
Section titled “Total Products”Total Products =COUNTROWS ( VALUES ( Sales_Table[Product] ) )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 ))