Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

use listbox value as variable in set analysis

Here's my thought:

when i choose the value of listbox,then my set Analysis will change according to the value.

for example:

China is one value of listbox,

when I choose China , Then the setAnalysis count({<Region = {'$(VriableName)'}>} distinct orderId)

will be  count({<Region = {'China'}>} distinct orderId)

Or is ther any other method that i can realize this instead of using listbox?

Thank you!

1 Solution

Accepted Solutions
neha_shirsath
Specialist
Specialist

Hii,

See the attachment if it is helpful for u.

View solution in original post

4 Replies
Anonymous
Not applicable
Author

Well, if your region field is in a table connected to the order table already there wouldn't be any need for the variable/set analysis and picking 'China' as region would automatically narrow down your selection of orders to the ones related to China.

But I'm guessing you have some specific modelling issue you're trying to overcome using variables and set analsysis

Not applicable
Author

yes,I just used region as an example.

Actually my problem is : when user choose month 2012-08 then I need show 2011-08 also,

so I need to calculate in the set analysis.

neha_shirsath
Specialist
Specialist

Hii,

See the attachment if it is helpful for u.

Not applicable
Author

hi, another quetion, if i choose month 2012/09/01, then i want to show the data of 2012/09/01

2012/08/01,2012/07/01 and  2011/09/01. (notice here is the month year ago)

How can i write the set analysis?

I kown how to get the continuous month

her is my set analysis:

count({<UsageCategory = {'LoginsDistribution'},UsageYearMonth={'<=$(=Only(UsageYearMonth))>=$(=Only(UsageYearMonth)-2)'>} distinct OrderId)

Bu i dont konw how to add the month yaer ago

because I can only write one set analysis  I can't seperate them. The should be  presented in one chart.

Thank you