Hello Stuart,
Under “SWITCH( TRUE () )” you can try to put the code as given below which in your case may vary due to naming conventions but logic will remain the same.
Totals Selection =
VAR CurrentItem = SELECTEDVALUE( 'Income Statement Template'[Items - Normalized] )
VAR Revenues = 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( [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', 'Income Statement'[Items] = CurrentItem ) ) )
VAR %ofRevenues = SWITCH( TRUE(),
CurrentItem = "Total Revenues", FORMAT( 1, "0.00%" ),
CurrentItem = "Total COGS", FORMAT( DIVIDE( [COGS], [Revenues], 0 ), "0.00%" ),
CurrentItem = "Total Gross Profit", FORMAT( DIVIDE( [Gross Profit], [Revenues], 0 ), "0.00%" ),
CurrentItem = "Total Other Expenses", FORMAT( DIVIDE( [Expenses], [Revenues], 0 ),"0.00%" ),
CurrentItem = "Total Net Profit", FORMAT( DIVIDE( [Net Profit], [Revenues], 0 ), "0.00%" ),
FORMAT( DIVIDE( CALCULATE( [Actuals (,000)] * 1000,
FILTER( 'Income Statement', 'Income Statement'[Items] = CurrentItem ) ), [Revenues], 0 ), "0.00%" ))
RETURN
SWITCH( TRUE(),
[Table Data] = "Revenues", Revenues,
[Table Data] = "% of Revenue", %ofRevenue,
BLANK() )
And then drag the created measure into the P&L Statement Template.
Hoping you will the desired result.
Thanks & Regards,
Harsh