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: 
sibin_jacob
Creator III
Creator III

Listbox Multiple selection

Hi,

I have a table with 3 fields like Product_ID,Product_Name,Market_ID.

In my application I have 2 Listbixes for product names.

In this listboxes I am filtering data based on Market_ID using expression in field selection.

This is the my first list box expression

if(Market_ID=1,Product_Name)

This is the my second list box expression

if(Market_ID=2,Product_Name)

It is filtering based on Market perfectly.

But I need to select product from both the listboxes.

If I am selecting product from one listbox it's clearing the selection in another listbox automatically.

Please help me ....

Thanks

Sibin Jacob.C

1 Solution

Accepted Solutions
cesaraccardi
Specialist
Specialist

I've attached a small sample, please take a look.

View solution in original post

12 Replies
cesaraccardi
Specialist
Specialist

Hi Sibin,

If you are using QV 11 you may use the Alternate States functionality. This way you can use the same field (Product_Name) in different states, what do you think about this?

Regards,

Cesar

sibin_jacob
Creator III
Creator III
Author

Yes Cesar, I am using QV 11. Now I created two alternate states.

That product selection is working fine.

I have Trend chart . In that chart I have required all the selected  products from both the markets.

Please give me your suggestions

Thanks

Sibin Jacob.C

cesaraccardi
Specialist
Specialist

Sibin,

Basicly you must first add the 2 states to the document, you can make this at the Document Properties dialog  / General tab -> Alternate States... button.

Then you must configure your list boxes to each state, you can do this by selecting the Alternate State in the General tab of the object properties dialog.

Regards,

Cesar

sibin_jacob
Creator III
Creator III
Author

Thanks Ceaser..

Now I created two alternate states.

That product selection is working fine.

I have a Trend chart . In that chart I have required all the selected  products from both the markets.

Please give me your suggestions

Thanks

Sibin Jacob.C

cesaraccardi
Specialist
Specialist

Ok Sibin,

To make the alternate states work with your chart you must "connect" the expressions with the states. This can be done using set analysis, are you familiar with it? You may use the set identifier to specify the state, for example:

Lets say you created 2 states: State1 and State2, you can have 2 expressions to compare it:

sum({State1} Value) and sum({State2} Value)

If you want both in a single expression you can have this:

sum({State1+State2} Value)

Hope it helps,

Cesar

sibin_jacob
Creator III
Creator III
Author

Hi Ceaser,

In my trend chart dimensions are Product_name and week.

Expression is sum(volume).

If I am selecting product from both the listboxes those product will come in trend chart.

How i will give the dimension ?

Regards,

Sibin Jacob.C

senpradip007
Specialist III
Specialist III

Hi Sibin,

If you are using QV 11 you may use the Alternate States functionality at "Setting>Document Property>Alternate State".

You can add two Groups. This way you can use the same field (Product_Name) in different states.

Hope it helps you.

sibin_jacob
Creator III
Creator III
Author

Hi Pradip,

I have a Trend chart . In that trend chart I need the selected products from both the list boxes as dimension.

Dimensions are Product_Name and Week.

Expression is Sum(Volume).

Is it possible ?

Regards,

Sibin Jacob.C

cesaraccardi
Specialist
Specialist

Hi Sibin,

You need an expression like this:

Sum({State1+State2} Volume)

The dimension used can be the Product_Name and the Week.

Where State1 is defined as the alternate state for one list box and State2 for the other.

Regards,

Cesar