>> Download the sample (Power BI)
This sample shows how to isolate the extent to which different factors affect YoY profit growth (i.e. to see whether an increase in YoY profit growth was driven mostly by an increase in YoY sales growth %, or by an increase in YoY profit margin growth).
Dashboard - Snippet
Section titled “Dashboard - Snippet”
Data Model - Snippet
Section titled “Data Model - Snippet”
Measures - Profit
Section titled “Measures - Profit”Profit Margin
Section titled “Profit Margin”Profit Margin =DIVIDE ( [Total Profits], [Total Sales], 0 )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 Profits LY
Section titled “Total Profits LY”Total Profits LY =CALCULATE ( [Total Profits], SAMEPERIODLASTYEAR ( Calendar_Table[Date] ) )Total Sales
Section titled “Total Sales”Total Sales =SUMX ( Sales_Table, Sales_Table[Unit Price] * Sales_Table[Quantity] )Total Sales Growth %
Section titled “Total Sales Growth %”Total Sales Growth % =DIVIDE ( [Total Sales] - [Total Sales LY], [Total Sales LY], 0 )Total Sales LY
Section titled “Total Sales LY”Total Sales LY =CALCULATE ( [Total Sales], SAMEPERIODLASTYEAR ( Calendar_Table[Date] ) )YoY Profit Growth
Section titled “YoY Profit Growth”YoY Profit Growth =[Total Profits] - [Total Profits LY]YoY Profit Margin Growth
Section titled “YoY Profit Margin Growth”YoY Profit Margin Growth =[Profit Margin] - [Profit Margin LY]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 ))