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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
NancyG
Contributor
Contributor

Use variable in equation string

I have a whisker plot a specific parameter of my data, ACTUAL_CE_PH1_MJ.  One of the Expressions for the Plot is:

Fractile(Aggr(avg(ACTUAL_CE_PH1_MJ),[PROGRAM],[ACTUAL_CE_PH1_MJ]), 0.25)

I have a list box that contains a list of parameters available in the data set and I have created a variable, vPick = GetFieldSelections(listbox_name).

How do I change the formula above to use vPick instead of a specific parameter name?  I don’t understand the $ operator well enough to know why/when to use it.

I’ve tried this and while the Expression is okay (per the edit box), I don’t get the same plot as when I use hard coded the parameter name.

Fractile(Aggr(avg($(=vPick),[PROGRAM],$(=vPick)), 0.25)

Thanks for your help.

Labels (1)
1 Solution

Accepted Solutions
NancyG
Contributor
Contributor
Author

I figured it out..

Fractile(Aggr(avg($(vPick)),[PROGRAM],$(vPick)), 0.5)

View solution in original post

1 Reply
NancyG
Contributor
Contributor
Author

I figured it out..

Fractile(Aggr(avg($(vPick)),[PROGRAM],$(vPick)), 0.5)