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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Using variables in expression of Pie Chart

HI everyone,

I have made a Pie Chart displaying avg(salary)

i have made three buttons 'Avg' , 'Min' , "Max' which set variable 'vSet' as 'Avg' 'Min' & 'Max' accordingly.

i want the expression to b written as vSet(salary) but it throws error i also tried =$(vSet(salary))

how to write it proper way.

any suggestions will b very helpful

1 Solution

Accepted Solutions
jagan
Partner - Champion III
Partner - Champion III

Hi,

Try like this

Create one more variable vExpression = vSet & '(salary)'

Now in expression editor you can use

=$(vExpression)

Hope this helps you.

Regards,

Jagan.

View solution in original post

5 Replies
jagan
Partner - Champion III
Partner - Champion III

Hi,

Try like this

Create one more variable vExpression = vSet & '(salary)'

Now in expression editor you can use

=$(vExpression)

Hope this helps you.

Regards,

Jagan.

Not applicable
Author

i tried as you said but Instead of evaluating it shows me 'min(salary)' as output.

it dosen't  shows the value it shows characters i.e min(salary)

sunny_talwar

Is this what you want? PFA

Update: Expression used $(vSet)(salary) or ($(vSet)(Data) in my case)

Best,

S

jagan
Partner - Champion III
Partner - Champion III

Hi,

Did you given = in variable declaration for vExpression ?  You have give = like below

vExpression                    =vSet & '(salary)'

Then it works, I think you missed it.

Regards,

Jagan.

Not applicable
Author

Thank you.