Hi @ElizabethTachjian ,
The trick is in the measure branching (creating one measure with usage of another)
Do in matrix you have Selected Year Actuals :
Selected Year Actuals =
VAR CurrentItem = SELECTEDVALUE( 'Income Statement Template'[Items (Normalized)] )
VAR _Results =
SWITCH( TRUE() ,
CurrentItem = "Total Revenues" , DIVIDE( [Revenues] , 1000 , 0 ) ,
CurrentItem = "Total COGS" , DIVIDE( [COGS] , 1000 , 0 ) ,
CurrentItem = "Total Gross Profit" , DIVIDE( [Gross Profit] , 1000 , 0 ) ,
CurrentItem = "Gross Profit %" , FORMAT( [% Gross Profit Margin] , "0.00%" ) ,
CurrentItem = "Total Other Expenses" , DIVIDE( [Other Expenses] , 1000 , 0 ) ,
CurrentItem = "Total Net Profit" , DIVIDE( [Net Profit] , 1000 , 0 ) ,
CurrentItem = "Net Profit %" , FORMAT( [% Net Profit Margin] , "0.00%" ) ,
CALCULATE([Actuals (,000)] , FILTER( 'Income Statement Data' , 'Income Statement Data'[Items] = CurrentItem ) ) )
RETURN
IF( ISBLANK( _Results ) ,
BLANK() ,
_Results )
Which uses measures:
Revenues = CALCULATE( [Income Values] , 'Income Statement Data'[Type] = "Revenues" )
COGS = CALCULATE( [Income Values] , 'Income Statement Data'[Category] = "COGS" ) * -1
Gross Profit = [Revenues] + [COGS]
% Gross Profit Margin = DIVIDE( [Gross Profit] , [Revenues] , 0 )
Other Expenses = ( CALCULATE( [Income Values] , 'Income Statement Data'[Type] = "Expenses" ) + [COGS] ) * -1
Net Profit = [Revenues] + [COGS] + [Other Expenses]
% Net Profit Margin = DIVIDE( [Net Profit] , [Revenues] , 0 )
Actuals (,000) =
VAR Revenue = CALCULATE( [Income Values] , 'Income Statement Data'[Type] = "Revenues" )
VAR Expense = CALCULATE( [Income Values] , 'Income Statement Data'[Type] = "Expenses" ) * -1
RETURN
DIVIDE(
IF( SELECTEDVALUE( 'Income Statement Data'[Type] ) = "Revenues" , Revenue ,
IF( SELECTEDVALUE( 'Income Statement Data'[Type] ) = "Expenses" , Expense ,
Revenue + Expense ) ) , 1000 , 0 )
And they are on the top of
Income Values = SUM( 'Income Statement Data'[Value] )
Which is in Income Statement Data table which has join to Date