Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
help4qv123
Creator II
Creator II

Expression Based on User Selection

Hi friends,

I have a scenario like, I have a Straight table and two list boxes . user selects two values in both the list boxes and the chart(straight table) should be shown like. (1st value of listbox1 + 1st value of listbox2) in one expression. next expression will be

(1st value of listbox1 + 2nd value of listbox2) next

(2nd value of listbox1 + 1st value of listbox2) next

(2nd value of listbox1 + 2nd value of listbox2). next

(1st value of listbox1 ) next

(2nd value of listbox1 )

Total 4 expressions should be 1 after the another

I am attaching a sample for your reference. Plz let me know if any clarification. Just want to display expression based on user selected value.

1 Solution

Accepted Solutions
jzimolong
Creator II
Creator II

I often have to interrogate list box selections, and I typically use variables to capture these:

I can't open your sample qvw, but you could setup the following three variables and populate them like so.  The field that I'm interrogating below is "ver", so you just switch this to the list box field in your app:

vSelectedVersions:        =GetFieldSelections(ver,', ',20)  - This will list out all the selections in list box, with comma separating
vFirstSelected: =SubField(vSelectedVersions,', ',1)  - This will read the variable above, parsing out the first value in the list
vSecondSelected:           =SubField(vSelectedVersions,', ',2)  - This will read the first variable above, parsing out the second value in the list
Then, play around with displaying these values in Text Box objects or something like that, to come up with the visual you are describing above.  It's not the straight table solution you are asking for above, but you might be able to come up with something using these.

View solution in original post

5 Replies
petter
Partner - Champion III
Partner - Champion III

Something like this then:

2015-01-11 Combinations.PNG

petter
Partner - Champion III
Partner - Champion III

And if you need to keep the selections so they only affect the table(s) then you could put all of them in an Alernate State...

jzimolong
Creator II
Creator II

I often have to interrogate list box selections, and I typically use variables to capture these:

I can't open your sample qvw, but you could setup the following three variables and populate them like so.  The field that I'm interrogating below is "ver", so you just switch this to the list box field in your app:

vSelectedVersions:        =GetFieldSelections(ver,', ',20)  - This will list out all the selections in list box, with comma separating
vFirstSelected: =SubField(vSelectedVersions,', ',1)  - This will read the variable above, parsing out the first value in the list
vSecondSelected:           =SubField(vSelectedVersions,', ',2)  - This will read the first variable above, parsing out the second value in the list
Then, play around with displaying these values in Text Box objects or something like that, to come up with the visual you are describing above.  It's not the straight table solution you are asking for above, but you might be able to come up with something using these.
help4qv123
Creator II
Creator II
Author

Thank u...helpful ans....i will try and let you know if any issue....

petter
Partner - Champion III
Partner - Champion III

This version is an improvement of my first suggestion. It use Alternate State and illustrates how one

could access the dimension value of each dimension in the expression too.

2015-01-11 Combinations 2.PNG