Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

sibin_jacob
Contributor 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
Valued Contributor

Re: Listbox Multiple selection

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

12 Replies
cesaraccardi
Valued Contributor

Re: Listbox Multiple selection

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
Contributor III

Re: Listbox Multiple selection

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
Valued Contributor

Re: Listbox Multiple selection

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
Contributor III

Re: Listbox Multiple selection

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
Valued Contributor

Re: Listbox Multiple selection

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
Contributor III

Re: Listbox Multiple selection

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
Valued Contributor III

Re: Listbox Multiple selection

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
Contributor III

Re: Listbox Multiple selection

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
Valued Contributor

Re: Listbox Multiple selection

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