>> Download the sample (Power BI)
Profits – Sensitivity Analysis
Section titled “Profits – Sensitivity Analysis”This sample shows how to determine the effect on total portfolio profits of:
(i) Discounting the price of a selection of products,
(ii) Reducing the costs of all products, and/or
(iii) Changing the demand of all products
Dashboard - Snippet
Section titled “Dashboard - Snippet”
Data Model - Snippet
Section titled “Data Model - Snippet”
Measures - Actual
Section titled “Measures - Actual”Discounted Sales
Section titled “Discounted Sales”Discounted Sales =VAR DiscountedProducts = INTERSECT ( VALUES ( Products_Table[Products] ), ALL ( Products_Table[Products] ) )RETURN CALCULATE ( SUMX ( Sales_Table, Sales_Table[Quantity] * ( 1 + [Demand Changes Value] ) * Sales_Table[Unit Price] * ( 1 + [Discounting Value] ) ), DiscountedProducts )Discounted Sales (1 Yr r/f)
Section titled “Discounted Sales (1 Yr r/f)”Discounted Sales (1 Yr r/f) =CALCULATE ( [Discounted Sales], DATEADD ( Calendar_Table[Date], -1, YEAR ) )Non Discounted Sales
Section titled “Non Discounted Sales”Non Discounted Sales =VAR NonDiscountedProducts = EXCEPT ( ALL ( Products_Table[Products] ), VALUES ( Products_Table[Products] ) )RETURN CALCULATE ( SUMX ( Sales_Table, Sales_Table[Quantity] * ( 1 + [Demand Changes Value] ) * Sales_Table[Unit Price] ), NonDiscountedProducts )Non Discounted Sales (1 Yr r/f)
Section titled “Non Discounted Sales (1 Yr r/f)”Non Discounted Sales (1 Yr r/f) =CALCULATE ( [Non Discounted Sales], DATEADD ( Calendar_Table[Date], -1, YEAR ) )Scenario Costs
Section titled “Scenario Costs”Scenario Costs =CALCULATE ( SUMX ( Sales_Table, Sales_Table[Quantity] * ( 1 + [Demand Changes Value] ) * Sales_Table[Unit Cost] ) * ( 1 + [Cost Price Change Value] ), ALL ( Products_Table[Products] ))Scenario Costs (1 Yr r/f)
Section titled “Scenario Costs (1 Yr r/f)”Scenario Costs (1 Yr r/f) =CALCULATE ( [Scenario Costs], DATEADD ( Calendar_Table[Date], -1, YEAR ) )Scenario Profit Margin
Section titled “Scenario Profit Margin”Scenario Profit Margin =DIVIDE ( [Scenario Profits (1 Yr r/f)], [Scenario Sales (1 Yr r/f)], 0 )Scenario Profits (1 Yr r/f)
Section titled “Scenario Profits (1 Yr r/f)”Scenario Profits (1 Yr r/f) =[Scenario Sales (1 Yr r/f)] - [Scenario Costs (1 Yr r/f)]Scenario Sales (1 Yr r/f)
Section titled “Scenario Sales (1 Yr r/f)”Scenario Sales (1 Yr r/f) =[Discounted Sales (1 Yr r/f)] + [Non Discounted Sales (1 Yr r/f)]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 ))Cost Price Change
Section titled “Cost Price Change”Cost Price Change =GENERATESERIES ( -0.1, 0.2, 0.05 )Demand Changes
Section titled “Demand Changes”Demand Changes =GENERATESERIES ( -0.06, 0.2, 0.02 )Discounting
Section titled “Discounting”Discounting =GENERATESERIES ( -0.3, 0.02, 0.02 )