>> Download the sample (Power BI)
This sample shows who the top 3 most profitable customers are,
(i) by Total Profits made from these customers,
for each region and each product category.
Dashboard - Snippet
Section titled “Dashboard - Snippet”
Data Model - Snippet
Section titled “Data Model - Snippet”
Measures - Profit & Customers
Section titled “Measures - Profit & Customers”Ranking of Customers based on Total Profits
Section titled “Ranking of Customers based on Total Profits”Ranking of Customers based on Total Profits =RANKX ( ALL ( Customer_Table ), [Total Profits],, DESC )Total Costs
Section titled “Total Costs”Total Costs =SUMX ( Sales_Table, Sales_Table[Unit Cost] * Sales_Table[Quantity] )Total Profits
Section titled “Total Profits”Total Profits =[Total Sales] - [Total Costs]Total Profits of Top 3 Most Profitable Customers
Section titled “Total Profits of Top 3 Most Profitable Customers”Total Profits of Top 3 Most Profitable Customers =IF ( ISFILTERED ( Customer_Table[Customer] ), IF ( 'Profit & Customer Measures'[Ranking of Customers based on Total Profits] <= 3, [Total Profits], BLANK () ), CALCULATE ( [Total Profits], TOPN ( 3, VALUES ( Customer_Table[Customer] ), [Total Profits] ) ))Total Sales
Section titled “Total Sales”Total Sales =SUMX ( Sales_Table, Sales_Table[Unit Price] * Sales_Table[Quantity] )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 ))