>> Download the sample (Power BI)
This sample shows whether YoY Sales Growth % was also profitable, by comparing YoY Sales Growth % against YoY Profit Growth for each customer (disaggregated into two groups by whether YoY Profit Growth is positive or negative).
Dashboard - Snippet
Section titled “Dashboard - Snippet”
Data Model - Snippet
Section titled “Data Model - Snippet”
Measures - Profit
Section titled “Measures - Profit”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 LY
Section titled “Total Sales LY”Total Sales LY =CALCULATE ( [Total Sales], SAMEPERIODLASTYEAR ( Calendar_Table[Date] ) )YoY Profit Decrease (Based on each Customer’s YoY Profit Growth)
Section titled “YoY Profit Decrease (Based on each Customer’s YoY Profit Growth)”YoY Profit Decrease (Based on each Customer's YoY Profit Growth) =CALCULATE ( [YoY Profit Growth], FILTER ( VALUES ( Customer_Table[Customer] ), COUNTROWS ( FILTER ( 'YoY Profit Growth Binary Group', [YoY Profit Growth] < 'YoY Profit Growth Binary Group'[Change] ) ) ))YoY Profit Growth
Section titled “YoY Profit Growth”YoY Profit Growth =[Total Profits] - [Total Profits LY]YoY Profit Growth (Disaggregated into Groups based on each Customer’s YoY Profit Growth)
Section titled “YoY Profit Growth (Disaggregated into Groups based on each Customer’s YoY Profit Growth)”YoY Profit Growth (Disaggregated into Groups based on each Customer's YoY Profit Growth) =IF ( SELECTEDVALUE ( 'YoY Profit Growth Binary Group'[Group] ) = "Above 0", [YoY Profit Increase (Based on each Customer's YoY Profit Growth)], [YoY Profit Decrease (Based on each Customer's YoY Profit Growth)])YoY Profit Increase (Based on each Customer’s YoY Profit Growth)
Section titled “YoY Profit Increase (Based on each Customer’s YoY Profit Growth)”YoY Profit Increase (Based on each Customer's YoY Profit Growth) =CALCULATE ( [YoY Profit Growth], FILTER ( VALUES ( Customer_Table[Customer] ), COUNTROWS ( FILTER ( 'YoY Profit Growth Binary Group', [YoY Profit Growth] >= 'YoY Profit Growth Binary Group'[Change] ) ) ))YoY Sales Growth %
Section titled “YoY Sales Growth %”YoY Sales Growth % =DIVIDE([Total Sales] - [Total Sales LY], [Total Sales LY], 0)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 ))