Hello @agagnon,
Thank You for posting your query onto the Forum.
@BrianJ Thank You for providing me this opportunity to solve this query.
@agagnon in the Excel file you’ve provided us the desired figure that you’re looking for. Below is the screenshot provided for the reference -
To achieve this, firstly I wrote individual measures and then using the measure branching technique at the end I consolidated those measures and achieved the target figure. Below is the screenshot provided for the reference -
Please Note: Due to decimal round off issue the figure is short by $1/-.
Once I got that figure using the measure branching technique. Then I turned those measures into the single master measure for each of the categories - Actuals, Budgets and Better/(Worse) using the variables. Below are the formulas provided for the reference -
Actuals 2 =
VAR Revenue =
CALCULATE([Actual - GL Detail],
FILTER( 'Financial Statement Format',
'Financial Statement Format'[SOP Actuals Category] = "Revenue" ) ) * -1
VAR Expenses =
CALCULATE([Actual - GL Detail],
FILTER( 'Financial Statement Format',
'Financial Statement Format'[SOP Actuals Category] = "Expense" ) ) * -1
VAR FixedAssets =
CALCULATE([Actual - GL Detail],
FILTER( 'Financial Statement Format',
'Financial Statement Format'[SOP Actuals Category] = "Fixed Assets Gain/Loss" ) ) * -1
VAR Depreciation =
CALCULATE([Actual - GL Detail],
FILTER( 'Financial Statement Format',
'Financial Statement Format'[SOP Actuals Category] = "Depreciation" ) ) * -1
VAR InvestmentGainLoss =
CALCULATE([Actual - GL Detail],
FILTER( 'Financial Statement Format',
'Financial Statement Format'[SOP Actuals Category] = "Investment Gain Loss" ) ) * -1
RETURN
Revenue + Expenses + FixedAssets + Depreciation + InvestmentGainLoss
Budgets 2 =
VAR Revenue =
CALCULATE( [Budget] ,
FILTER( 'Financial Statement Format',
'Financial Statement Format'[SOP Actuals Category] = "Revenue" ) )
VAR Expenses =
CALCULATE( [Budget] ,
FILTER( 'Financial Statement Format',
'Financial Statement Format'[SOP Actuals Category] = "Expense" ) )
VAR FixedAssets =
CALCULATE( [Budget] ,
FILTER( 'Financial Statement Format' ,
'Financial Statement Format'[SOP Actuals Category] = "Fixed Assets Gain/Loss" ) )
VAR Depreciation =
CALCULATE( [Budget] ,
FILTER( 'Financial Statement Format' ,
'Financial Statement Format'[SOP Actuals Category] = "Depreciation" ) )
VAR InvestmentGainLoss =
CALCULATE( [Budget] ,
FILTER( 'Financial Statement Format' ,
'Financial Statement Format'[SOP Actuals Category] = "Investment Gain Loss" ) )
RETURN
( Revenue + InvestmentGainLoss ) - ( Expenses + FixedAssets + Depreciation )
Better/(Worse) 2 = [Actuals 2] - [Budgets 2]
Below is the screenshot attached by using this formula as well for the reference -
As I’ve always advocated onto the Forum that one should go for the measure branching technique first and once we get the results or understand the concept about where we’ve faltered then we can go for the variables. Because it’s always difficult to trace the error while using variables since all the calculations all happening virtually.
@sam.mckay in his majority of his videos as well has been vocal about this technique. Since this technique is always very helpful whether we start building the formula or when it comes to error tracing.
I’m attaching the Excel as well as PBIX file of the working for the reference.
Hoping you find this useful and meets your requirements that you’ve been looking for.
Please Note: Solution Page - 1 contains the results obtained by measure branching technique whereas the Solution Page - 2 contains the results obtained by variable technique. And I’ve also created separate measure groups for the Actuals, Budgets and Better/(Worse).
Thanks and Warm Regards,
Harsh
Desired Result.xlsx (29.0 KB)
Finance Model - Actuals vs Budgets - Harsh.pbix (418.1 KB)