Skip to content

Percent of Total Sales, from Top 1 Most buying Customer, in each Region

>> 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.

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 =
DISTINCTCOUNT ( Sales_Table[Customer] )
Total Sales =
SUMX ( Sales_Table, Sales_Table[Unit Price] * Sales_Table[Quantity] )
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 )
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 )
)