>> Download the sample (Power BI)
This sample shows sales from the top 3 customers of any given product.
Dashboard - Snippet
Section titled “Dashboard - Snippet”
Data Model - Snippet
Section titled “Data Model - Snippet”
Measures - Sales
Section titled “Measures - Sales”Top 3 Customer Sales
Section titled “Top 3 Customer Sales”Top 3 Customer Sales =CALCULATE ( [Total Sales], TOPN ( 3, VALUES ( Customer_Table[Customer] ), [Total Sales], DESC ))Top 3 Customer Sales Correct Total
Section titled “Top 3 Customer Sales Correct Total”Top 3 Customer Sales Correct Total =SUMX ( SUMMARIZE ( Products_Table, Products_Table[Products], "Top 3", [Top 3 Customer Sales] ), [Top 3])Total Sales
Section titled “Total Sales”Total Sales =SUMX ( Sales_Table, Sales_Table[Quantity] * Sales_Table[Unit Price] )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 ))