Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Is there a way to put multiple string in a single parameter ?
For eg:
Expression:
Let vE_Sales = sum({<Year = {$1}>} Sales);
When calling this expression we say
$(vE_Sales('2016'))
But if I wanted to do the same for multiple years. Let say 2016 & 2015. how do we do pass multiple string values in a single parameter ?
$(vE_Sales('2016', '2015'))
Hi,
I think this will work from script or variable overview window
From Script:
LET vVarMultiple = CHR(39) & 2015 & CHR(39) & CHR(44) & CHR(39) & 2016 & CHR(39);
From Variable Overview Window:
CHR(39) & 2015 & CHR(39) & CHR(44) & CHR(39) & 2016 & CHR(39)
The result is '2015','2016'
Hope this helps
Hi,
Look
Hi
In variable overview you can pass multiple values using Valuelist() .
Eg: =ValueList('2015,2016,207')
I think this will be helpful: Re: variable with comma parameter
- Marcus
Hi,
I guess it could be easier to use another separator than comma between your year values, as it will be interpreted as separator of multiple variable parameters ($1, $2, $3 ...).
So one solution might be to use the The Search String:
SET vE_Sales = Sum({$<Year={"($1)"}>} Sales);
table1:
LOAD 2000+RecNo() as Year,
Money(Ceil(Rand()*1000),'$#,##0;($#,##0)') as Sales
AutoGenerate 16;
hope this helps
regards
Marco