Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
vish123
Creator III
Creator III

Questions on Parameterized variables in Qlik

Hi Team,

I am facing a challenge that i am unable to pass string value using $1 variable to another variable.

=$(vVariable1($(vVariable2)))

vVariable1 = Fractile($1 Aggr(Median($1 Metric),VIN),0.1)

vVariable2= {1<Set={4}, Dim2=P( ID), Dim1={1}, $3, $4>}

Here i wanted to pass entire vVariable2 to vVariable1 inplace of $1 , My expressions working fine if i put this set analysis value to the above function but when i am trying to pass this value via parameter . its not getting passed. Please suggest.

Thanks

Vish

1 Reply
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi @vish123 

This is because variable parameters are inserted into your vVariable1 as comma separated value parameters. 

When you look at your vVariable2 variable it is a list of comma separated values being

  • {1<Set={4},
  • Dim2=P( ID),
  • Dim1={1},
  • $3,
  • $4>}

When your expression gets parsed in vVariable1 it will be parsed as:

Fractile({1<Set={4} Aggr(Median({1<Set={4} Metric),VIN),0.1)

It is very well known scenario and there are other topics describing it already on community. 

On top of that there is another issue when you have more than 9 parameters as 10th parameter if not declared can be also causing issues. More on those below:

cheers

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.