>> Download the sample (Power BI)
This sample shows the total sales of the single highest-buying customer, as a % of total sales, for each region and in each quarter.
Dashboard - Snippet
Section titled “Dashboard - Snippet”
Data Model - Snippet
Section titled “Data Model - Snippet”
Measures - Sales & Customer
Section titled “Measures - Sales & Customer”Name of Top 1 Most Buying Customer
Section titled “Name of Top 1 Most Buying Customer”Name of Top 1 Most Buying Customer =CALCULATE ( SELECTEDVALUE ( Customer_Table[Customer] ), TOPN ( 1, ALL ( Customer_Table ), [Total Sales], DESC ))Total No. of Distinct Customers
Section titled “Total No. of Distinct Customers”Total No. of Distinct Customers =DISTINCTCOUNT ( Sales_Table[Customer] )Total Sales
Section titled “Total Sales”Total Sales =SUMX ( Sales_Table, Sales_Table[Unit Price] * Sales_Table[Quantity] )Total Sales of Top 1 Most Buying Customer
Section titled “Total Sales of Top 1 Most Buying Customer”Total Sales of Top 1 Most Buying Customer =IF ( COUNTROWS ( TOPN ( 1, SUMMARIZE ( Customer_Table, Customer_Table[Customer], "Sales Amount", [Total Sales] ), [Sales Amount] ) ) <= 1, SUMX ( TOPN ( 1, SUMMARIZE ( Customer_Table, Customer_Table[Customer], "Sales Amount", [Total Sales] ), [Sales Amount] ), [Total Sales] ), SUMX ( TOPN ( 1, SUMMARIZE ( Customer_Table, Customer_Table[Customer], "Sales Amount", [Total Sales] ), [Sales Amount] ), [Total Sales] ) / COUNTROWS ( TOPN ( 1, SUMMARIZE ( Customer_Table, Customer_Table[Customer], "Sales Amount", [Total Sales] ), [Sales Amount] ) ))Total Sales of Top 1 Most Buying Customer as % of Total Sales
Section titled “Total Sales of Top 1 Most Buying Customer as % of Total Sales”Total Sales of Top 1 Most Buying Customer as % of Total Sales =DIVIDE ( [Total Sales of Top 1 Most Buying Customer], [Total Sales], 0 )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 ))