Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I'm having issues with using single quotes and commas when passing parameters into variables.
Essentially I have an expression with set analysis I want to reuse across my document, and I want to be able to pass additional set analysis elements, ideally stored in variables, into it. Sometimes those additional set analysis elements contain commas or single quotes (e.g. Field={'020','030'}).
My original Expression I want to modify is:
sum({$<$1,$2,[Insurance Type Desc]={'Direct','Assumed'}>} [Written Premium])
Additional set analysis I may want to pass in is:
[Policy Key]={"=Count({$<[Transaction Code]={'045','02'}>} [Transaction ID])>0"}
and/or
[Transaction Code]={'00','01','010','020'}
So I want to be able to do something like:
$(vSumGrossWP_Mod($(vE21Set),$(vE21Set2)))
I have looked at a few other posts and tried some solutions and couldn't get anything to work. I've tried both storing the additional parameters in variables and typing them directly. I understand the concept of replacing the characters, but everything I try is resulting in one of the following:
sum({$< or
sum({$<$1,$2,[Insurance Type Desc]={'Direct','Assumed'}>} [Written Premium]) or
sum({$<-,[Insurance Type Desc]={'Direct','Assumed'}>} [Written Premium])
Below are links to the topics I have browsed. Any help is appreciated. I would prefer not to upload scrambled example data, but I probably could.
Comma-problem-workaround-for-dollar-sign-expansion
Beside the suggestion from Ruben you could try the following syntax:
[Transaction Code]={(00|01|010|020)}
- Marcus
Thank you both for the suggestions. Ruben's solution worked for my situation.
The pipes wanted to give me a syntax error as if I hadn't completed the field's set. Didn't fidget with it to much. Maybe "=01|02|03|04" would have worked?
Another quick question... I'm assuming if I want to distinguish 002 from 02 I have to enclose it as a string with the single quotes correct? I.E. would I need to type: Field={'02','002'} or would Field={02,002} work as well?