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: 
Saravanan_Desingh

Dynamic Variable Name in Chart

I have a situation like, I have to create a dynamic variable name and use in Objects, based on a button click.

I have a value coming from a variable. Let us assume 'var1' and has values of 'A', 'B' & 'C'.

Based on a button press, I am setting this value.

In an Object let us assume 'Chart', I would like to use it as a variable "A rest" or "B rest" or "C rest".

I already have these variables defined and I am trying to calculate its count.

Count([A rest])

I have tried below and its not working

Count([$(var1) rest])

Count([$(=var1) rest])

Any advise please... I hope I am clear with my situation.

1 Solution

Accepted Solutions
maxgro
MVP
MVP

3 Replies
maxgro
MVP
MVP

see attachment

Saravanan_Desingh
Author

Thank you maxgro. For some reason, my calculation is done only if I reload the script. Do you think, I have to change any options in Button or Chart Object?

Saravanan_Desingh
Author

Please ignore it. I was wrong in setting the values. Thanks again