>> Download the sample (Power BI)
This sample shows for which customers profit margins have been contracting over time, by:
Comparing:
- Profit margins with growth in profit margins from the prior year
Other financial measures, such as total profits and total sales, are also shown to provide further insight.
Dashboard - Snippet
Section titled “Dashboard - Snippet”
Data Model - Snippet
Section titled “Data Model - Snippet”
Measures - Profit & Customer
Section titled “Measures - Profit & Customer”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 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] )Total Sales (CY vs LY)
Section titled “Total Sales (CY vs LY)”Total Sales (CY vs LY). =[Total Sales] - [Total Sales LY]Total Sales LY
Section titled “Total Sales LY”Total Sales LY =CALCULATE ( [Total Sales], SAMEPERIODLASTYEAR ( Calendar_Table[Date] ) )Total Transactions
Section titled “Total Transactions”Total Transactions =COUNTROWS ( Sales_Table )Total Transactions LY
Section titled “Total Transactions LY”Total Transactions LY =CALCULATE ( [Total Transactions], SAMEPERIODLASTYEAR ( Calendar_Table[Date] ) )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 ))