Forum Discussion
quickbi
2 years agoHelper II
Filtering Calclulations
Hi all, I'm doing a table with calculation, and presented with an excel structure template to order this calculations. The problem come when I do the total row. For example I do Revenues calculatio...
Samarth_18
2 years agoCommunity Champion
Hi quickbi ,
To answer more specifically we need more information like sample data. However based on your description you could try the below code:-
Selected Year Actuals =
VAR Current_Item = SELECTEDVALUE('Income statement'[Level1])
RETURN
SWITCH(
TRUE(),
Current_Item = "Total Revenues", [PL_Revenues],
Current_Item = "Total COGS", [PL_COGS],
Current_Item = "Total Gross Profit", [PL_Gross Margin],
CALCULATE(
[Actuals],
FILTER(
'PL Ledger',
'PL Ledger'[Income statement.Level1] = Current_Item
)
)
)