Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
alexpanjhc
Specialist
Specialist

Or selections for list box

Hi All

I hope this is simple question

I have one set of list boxes,

one list box is primary owner and the other one is secondary owner,

what do I do so that I can select the  the primary owner is A or secondary owner is B?

Primary OwnerSecondary OwnerShipID
AB1
AC2
CB4

when I select Primary owner A and secondary Owner is b

ShipID 1 and 4 will show?

thanks!

1 Solution

Accepted Solutions
swuehl
MVP
MVP

You can also load this table twice and transform your two owner fields into one concatenated field and a owner type field that tags the owner according the original field.

Now you can select all owners in one list box, OR condition by default.

You still can filter primary and secondary owners by owner type field.

You can also keep the original table, if needed, so these tables would link by ShipID and you have most flexible ways to use the owner information.

View solution in original post

5 Replies
jwjackso
Specialist III
Specialist III

I believe C and B will give you ShipID 1 and 4, A and B should give you 1, 2 and 4.

I had a similar need, so I used alternate  states.  In the attached app, I selected Primary Owner = C and pressed the "Copy Default State to Alternate State1", I then pressed the "Clear Default State".

I selected Secondary Owner = B and pressed the "Copy Default State to Alternate State2", I then pressed the "Clear Default State".

The "Set State Filter" creates a set analysis statement that is used to calculate the number of ShipID's, I suppress for zero

=If(Count( $(=(vStateFilter)) Distinct ShipID) < 1,Null(),Count( $(=(vStateFilter)) Distinct ShipID))

The "Build Filter form Excel data was also part of the POC,  you can copy a column of data from Excel and generate a filter.

This was built for a specific need, but at the least it demonstrates alternate states.

alexpanjhc
Specialist
Specialist
Author

Thank you for your responses and I will take a look at the articles.

swuehl
MVP
MVP

You can also load this table twice and transform your two owner fields into one concatenated field and a owner type field that tags the owner according the original field.

Now you can select all owners in one list box, OR condition by default.

You still can filter primary and secondary owners by owner type field.

You can also keep the original table, if needed, so these tables would link by ShipID and you have most flexible ways to use the owner information.

alexpanjhc
Specialist
Specialist
Author

Steve

what about a field in two tables and the two tables do not have a common keys, how do you deal with that?