>> Download the sample (Power BI)
Profits – Scenario Analysis
Section titled “Profits – Scenario Analysis”This sample shows how to determine the effect on total portfolio profits of:
(i) Increasing the price of a selection of products, by a specific percentage amount, and
(ii) Assuming a corresponding percentage change in the demand for all products
Dashboard - Snippet
Section titled “Dashboard - Snippet”
Data Model - Snippet
Section titled “Data Model - Snippet”
Measures - Actual
Section titled “Measures - Actual”Budgeted Costs
Section titled “Budgeted Costs”Budgeted Costs =SUMX ( Sales_Table, Sales_Table[Unit Cost] * Sales_Table[Quantity] )Budgeted Costs (1 Yr r/f)
Section titled “Budgeted Costs (1 Yr r/f)”Budgeted Costs (1 Yr r/f) =CALCULATE ( CALCULATE ( [Budgeted Costs], DATEADD ( Calendar_Table[Date], -1, YEAR ) ), ALL ( Products_Table[Products] ))Budgeted Profit (1 Yr r/f)
Section titled “Budgeted Profit (1 Yr r/f)”Budgeted Profit (1 Yr r/f) =[Budgeted Sales (1 Yr r/f)] - [Budgeted Costs (1 Yr r/f)]Budgeted Profit Margin
Section titled “Budgeted Profit Margin”Budgeted Profit Margin =DIVIDE ( [Budgeted Profit (1 Yr r/f)], [Budgeted Sales (1 Yr r/f)], 0 )Budgeted Sales
Section titled “Budgeted Sales”Budgeted Sales =SUMX ( Sales_Table, Sales_Table[Unit Price] * Sales_Table[Quantity] )Budgeted Sales (1 Yr r/f)
Section titled “Budgeted Sales (1 Yr r/f)”Budgeted Sales (1 Yr r/f) =CALCULATE ( CALCULATE ( [Budgeted Sales], DATEADD ( Calendar_Table[Date], -1, YEAR ) ), ALL ( Products_Table[Products] ))Cumulative Budgeted Profit (1 Yr r/f)
Section titled “Cumulative Budgeted Profit (1 Yr r/f)”Cumulative Budgeted Profit (1 Yr r/f) =CALCULATE ( [Budgeted Profit (1 Yr r/f)], FILTER ( ALLSELECTED ( Calendar_Table ), Calendar_Table[Date] <= MAX ( Calendar_Table[Date] ) ))Measures - Comparison
Section titled “Measures - Comparison”Cumulative Profit: Scenarios vs Budgeted
Section titled “Cumulative Profit: Scenarios vs Budgeted”Cumulative Profit: Scenarios vs Budgeted =[Cumulative Scenario Profits (1 Yr r/f)] - [Cumulative Budgeted Profit (1 Yr r/f)]Profit Margin: Scenarios vs Budgeted
Section titled “Profit Margin: Scenarios vs Budgeted”Profit Margin: Scenarios vs Budgeted =DIVIDE ( [Scenario Profits (1 Yr r/f)] - [Budgeted Profit (1 Yr r/f)], [Budgeted Profit (1 Yr r/f)], 0)Profit: Scenarios vs Budgeted
Section titled “Profit: Scenarios vs Budgeted”Profit: Scenarios vs Budgeted =[Scenario Profits (1 Yr r/f)] - [Budgeted Profit (1 Yr r/f)]Measures - Scenario
Section titled “Measures - Scenario”Cumulative Scenario Profits (1 Yr r/f)
Section titled “Cumulative Scenario Profits (1 Yr r/f)”Cumulative Scenario Profits (1 Yr r/f) =CALCULATE ( [Scenario Profits (1 Yr r/f)], FILTER ( ALLSELECTED ( Calendar_Table ), Calendar_Table[Date] <= MAX ( Calendar_Table[Date] ) ))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))Non Selected Products
Section titled “Non Selected Products”Non Selected Products =COUNTROWS ( EXCEPT ( ALL ( Products_Table[Products] ), VALUES ( Products_Table[Products] ) ))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)]Selected Products
Section titled “Selected Products”Selected Products =COUNTROWS ( INTERSECT ( VALUES ( Products_Table[Products] ), ALL ( Products_Table[Products] ) ))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 ))Demand Changes
Section titled “Demand Changes”Demand Changes =GENERATESERIES ( -0.06, 0.2, 0.02 )Cost Price Change
Section titled “Cost Price Change”Cost Price Change =GENERATESERIES(-0.1, 0.2, 0.05)Discounting
Section titled “Discounting”Discounting =GENERATESERIES ( -0.3, 0.02, 0.02 )