Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
<body>Hello All, A small query:- I have a set analysis expresssion that calculates the RM total when the account is 06200, and then adds another total. Now, at the moment this adds the figure for 06200 regardless if it's selected or not. What I want to do, is IF 06200 is selected or a selection within the accounts, then do this expression. Else, ignore 06200 (as it would normally). My current expression is this: <pre class="jive_text_macro jive_macro_code" jivemacro="code" ___default_attr="plain">sum({<gltr_acc={06200},pt_part_type={"R*"}> + <Rem={"N"}>} gltr_amt) </pre> I tried this: but it only works if 06200 is the only account selected (whereas multiple accounts would be selected) <pre class="jive_text_macro jive_macro_code" jivemacro="code" ___default_attr="plain"> if(gltr_acc='06200',sum({$<pt_part_type = {"R*"}>} gltr_amt),if(gltr_acc <> '06200',sum(gltr_amt))) </pre> Hope you can help me! Kind Regards, Dayna</body>
Dayna,
I'm not sure why you want to do this (there are probably easier ways to accomplish whatever you're trying to do), but this should work:
if(substringcount(getfieldselections(gltr_acc),'06200')>0,
sum({<gltr_acc={'06200'},pt_part_type={"R*"}> + <Rem={'N'}>} gltr_amt),
sum({<Rem={'N'}>} gltr_amt)
)
Regards,
The current expression is: sum({<gltr_acc={06200},pt_part_type={"R*"}> + <Rem={"N"}>} gltr_amt)
Dayna,
I'm not sure why you want to do this (there are probably easier ways to accomplish whatever you're trying to do), but this should work:
if(substringcount(getfieldselections(gltr_acc),'06200')>0,
sum({<gltr_acc={'06200'},pt_part_type={"R*"}> + <Rem={'N'}>} gltr_amt),
sum({<Rem={'N'}>} gltr_amt)
)
Regards,