Skip to main content
Announcements
Get Ready. A New Qlik Learning Experience is Coming February 17! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikwiz123
Creator III
Creator III

Create From and To Filters from fields

I have two Fields that has Countries.

 

I need to create two Filters (Dropdown boxes)

Source and Destination. How can I create two different List boxes from the these tables such that

1. If I select California in Source, it shouldn't show up in Destination List Box.

2. Also, how can I create One-way and Round trip Radio Buttons and if it is 'Round Trip', it should show Source and Destination Twice based on initial Source-Destination selections?

Example:

California to Floria - Roundtrip

Source                  Destination

California              Florida

Source                   Destination

Florida                  California

2 Replies
dena_reavis
Employee
Employee

If your source and destination are fields on the same record, you would be able to select source as CA in a list box and the other listbox will reduce to only those records that have FL. Here is some sample data. It might be a bit more involved if your field value on your real data is all in one field, but you could pull it apart using SubField, and if source and destination are equal, that might be RT, else OW.  Hope this is helpful.

 

Orders:
LOAD *,
If(Source=Dest,'Roundtrip','Oneway') as Trip_type
;
LOAD *,
SubField(descr,' to ',1) as Source,
SubField(descr,' to ',2) as Dest
;
LOAD * INLINE [
descr, order_id, qty
CA to FL, 123, 2000
CA to GA, 124, 2500
CA to CA, 125, 2100
FL to FL, 126, 2005
GA to FL, 127, 1900
];

qlikwiz123
Creator III
Creator III
Author

@dena_reavis 

Hi, this requires changing the existing fields with 'to' combinations, which is a lot of work. Also, this does not meet the requirement I have.

When a user selects One country in Source and another Country in Destination, and selects Roundtrip in a list box, it should show roundtrip as below:

Source                       Destination

Australia                    Canada

Source                       Destination

Canada                      Australia