>> Download the sample (Power BI)
This sample shows the profit margin growth of the top 3 most profitable sales people, ranked by their profit margin growth (i.e. the difference between the profit margin in the current year (CY) and the profit margin in the prior year (PY)).
Dashboard - Snippet
Section titled “Dashboard - Snippet”
Data Model - Snippet
Section titled “Data Model - Snippet”
Measures - Profits & Sales People
Section titled “Measures - Profits & Sales People”Profit Margin
Section titled “Profit Margin”Profit Margin =DIVIDE ( [Total Profits], [Total Sales], 0 )Profit Margin Growth
Section titled “Profit Margin Growth”Profit Margin Growth =[Profit Margin] - [Profit Margin LY]Profit Margin Growth of Top 3 Most Profitable Sales People by their Profit Margin Growth
Section titled “Profit Margin Growth of Top 3 Most Profitable Sales People by their Profit Margin Growth”Profit Margin Growth of Top 3 Most Profitable Sales People by their Profit Margin Growth =VAR RankingContext = VALUES ( SalesPerson_Table[Sales Person] )RETURN CALCULATE ( [Profit Margin Growth], TOPN ( 3, ALL ( SalesPerson_Table[Sales Person] ), [Profit Margin Growth], DESC ), RankingContext )Profit Margin LY
Section titled “Profit Margin LY”Profit Margin LY =CALCULATE ( [Profit Margin], DATEADD ( Calendar_Table[Date], -1, YEAR ) )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 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 ))