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: 
Anonymous
Not applicable

Create variable

Hi,

I want to create dynamic variable which get current selection.

Than I want to use this variable in condition.

For example, if current selection = A, show green color, else gray.

=if(FieldName = My selection), rgb(139,191,31), rgb(124,124,124))

Thanks,

20 Replies
chematos
Specialist II
Specialist II

try with '$(vIndustry)'

Anonymous
Not applicable
Author

Yes, I played around, but didn't work.

Cool!!! Thanks,

Anonymous
Not applicable
Author

No, didn't work.

I was confused with my chart, where I use Bookmark.

Anonymous
Not applicable
Author

It should be very easy issue.

I use it =if(Client = only(Client), rgb(139,191,31), rgb(124,124,124))

it shows all client green, but I selected just one.

chematos
Specialist II
Specialist II

Try with these options:

if(Client = match(Client,'$(vClient)'), ...)

if(Client = match(Client,$(vClient)), ...)

if(Client = concat('$(vClient)'), ...)

if(Client = concat($(vClient)), ...)

I don´t know why is not working with the variable....

Anonymous
Not applicable
Author

Please see my attached picture.

It's text box, which show me my current selection. I think I need separate it.Capture.JPG

chematos
Specialist II
Specialist II

=getCurrentSelections()

see de attached file

Anonymous
Not applicable
Author

I tried it.

Capture.JPG

It didn't match with Client, because it compares Client wit Variable=

Client: toolbarn.com

Industries: Construction

Anonymous
Not applicable
Author

I created like you offered 2 variable (=GetFieldSelections(Industries) and =GetFieldSelections(Client))

Anonymous
Not applicable
Author

Maybe because I use Alternate State.

I have 2 multibox.