Skip to content

Percentage breakdown of Sales, from different Customer groups, based on Numerical Ranking of Total Sales made

>> Download the sample (Power BI)

Percentage of Sales, from different Customer groups, based on Numerical Ranking of Total Sales made

Section titled “Percentage of Sales, from different Customer groups, based on Numerical Ranking of Total Sales made”

This sample shows the breakdown of total sales by discrete groups of customers (e.g. Top 3, Rank 3-6, the Rest), based on the total sales made to each customer.

Total Sales =
SUMX ( Sales_Table, Sales_Table[Unit Price] * Sales_Table[Quantity] )

Total Sales (Disaggregated into Groups based on each Customers Numerical Ranking of Total Sales made)

Section titled “Total Sales (Disaggregated into Groups based on each Customers Numerical Ranking of Total Sales made)”
Total Sales (Disaggregated into Groups based on each Customers Numerical Ranking of Total Sales made) =
CALCULATE (
[Total Sales],
FILTER (
VALUES ( Customer_Table[Customer] ),
COUNTROWS (
FILTER (
'Customers Grouped into Numerical Ranking Groups',
RANKX ( ALL ( Customer_Table[Customer] ), [Total Sales],, DESC ) > 'Customers Grouped into Numerical Ranking Groups'[Min]
&& RANKX ( ALL ( Customer_Table[Customer] ), [Total Sales],, DESC ) <= 'Customers Grouped into Numerical Ranking Groups'[Max]
)
) > 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 )
)