Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

Nesting Variables with parameters

I'm trying to pass the results of a variable with parameters to another variable having parameters but I can't quite get it to work.  I have this 2 variables which work when they are not nested.

eNetScenMV = Sum ({$<$(vMonthEnd), [Account Type]=, [Scenario]={$1}>} [#Market Value Usd])

     usage: $( eNetScenMV("PC1-") )

eSumOfSquares = sqrt( sqr($1) + sqr($2) + sqr($3) )

     usage $( eSumOfSquares(1, 2, 3) )

I need to use the results of eNetScenMV as parameters to eSumOfSquares like so in a TEXT object:

=$(eSumOfSquares($(eNetScenMV("PC1-")), $(eNetScenMV("PC2-")), $(eNetScenMV("PC3+"))))

When I do this I get an "Error in Set Modifier Expression".  I've tried a number of things but cannot get it to work.  I appreciate any help on this.

1 Solution

Accepted Solutions
Not applicable

Re: Nesting Variables with parameters

Nasario,

please try:

$(eSumOfSquares($(=$(eNetScenMV("PC1-"))), $(=$(eNetScenMV("PC2-"))), $(=$(eNetScenMV("PC3+")))))

2 Replies
Not applicable

Re: Nesting Variables with parameters

Nasario,

please try:

$(eSumOfSquares($(=$(eNetScenMV("PC1-"))), $(=$(eNetScenMV("PC2-"))), $(=$(eNetScenMV("PC3+")))))

Not applicable

Re: Nesting Variables with parameters

Thanks Dariusz Mielczarek this worked!  I'm still trying to understand this dollar expansion business .  Does the inner dollar expansion =$(eNetScenMV("PC1-") get the expression to be expanded by the outer $(...)?