I have encountered two issues related to a multi-value parameter called “Filter”. The parameter includes values corresponding to categories CAT_A through CAT_H. I aim to create a custom calculation field for setting up targets. When I select “Select All” in the filter parameter, I want the custom target to exclude targets from CAT_F and CAT_G.
The first issue arises when I set the “Filter” parameter default to “Select All”, but the target doesn’t function properly initially. I have to select “Select All” in the filter twice for the target to work as intended.
The second issue is that the targets for CAT_F and CAT_G do not appear in the chart. I seek guidance to address this problem or explore alternative options to achieve the desired output.
Thank you for your assistance.
Here’s the code for my calculated field :
ifelse(
notIn(‘ALL_VALUES’, ${Filter}), sumIf({target}, type <> ‘CAT_F’ AND type <> ‘CAT_G’)
,in(‘CAT_A’, ${Filter}), sumIf({target}, type = ‘CAT_A’)
,in(‘CAT_B’, ${Filter}), sumIf({target}, type = ‘CAT_B’)
,in(‘CAT_C’, ${Filter}), sumIf({target}, type = ‘CAT_C’)
,in(‘CAT_D’, ${Filter}), sumIf({target}, type = ‘CAT_D’)
,in(‘CAT_E’, ${Filter}), sumIf({target}, type = ‘CAT_E’)
,in(‘CAT_F’, ${Filter}), sumIf({target}, type = ‘CAT_F’)
,in(‘CAT_G’, ${Filter}), sumIf({target}, type = ‘CAT_G’)
,in(‘CAT_H’, ${Filter}), sumIf({target}, type = ‘CAT_H’)
)