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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
nz_chris
Contributor II
Contributor II

Set selections from a variable

Hello folks,

I am quite new to Qliksense and currently facing a problem which I unfortunately cannot handle on my own.

I want to store values from a filter pane into a variable. I have done that with getfieldseletions and it worked.

But now I want to use this values on another filter pane with alternate state.

I tried this expression {$<Field={'$(vVariable)'}>} but it did not work.

Any suggestions?

Labels (1)
1 Solution

Accepted Solutions
nz_chris
Contributor II
Contributor II
Author

Hello again,

I Solved it on my own. I share the solution for all facing the same problem.

When you take your values with an action via "set variable" you must not use "GetFieldSelections(Field)" cause you get a string with the values comma separated. But instead you need them semi colon separated. So you have to use "replace(GetFieldSelections(Field),',',';')"

Afterwards your can generate a new action with "select values in a field" and set the variable as value.

View solution in original post

4 Replies
Mathumitha
Partner - Contributor III
Partner - Contributor III

Hi @nz_chris ,

For example,

If we need to calculate the sum of sales for the year that is getting selected, then,

sum({[StateA]}{<Year={'$(vVariable)'}>}Sales)

 

 

nz_chris
Contributor II
Contributor II
Author

Hi @Mathumitha ,

thank you for your suggestion. It is not exactly what I want to do. I just want to select the fields stored in the variable.

How can I achieve this?

 

nz_chris
Contributor II
Contributor II
Author

Hello again,

I Solved it on my own. I share the solution for all facing the same problem.

When you take your values with an action via "set variable" you must not use "GetFieldSelections(Field)" cause you get a string with the values comma separated. But instead you need them semi colon separated. So you have to use "replace(GetFieldSelections(Field),',',';')"

Afterwards your can generate a new action with "select values in a field" and set the variable as value.

Prithika
Contributor III
Contributor III

hello,

I have question

in a dataset i have student name and their fees status

is it possible for me to use kpi to show their fees status if i selected a student name in filter pane?