Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

One selection for multiple fields

Hi,

A have a case where I have data like this:

Date

From

To

Amount

01-Apr

London

Belfast

£1

01-May

Birmingham

Edinburgh

£2

01-Jun

Belfast

Cardiff

£1

01-Jul

Cardiff

London

£3

01-Aug

London

Edinburgh

£2

I want to be able to select all transactions for a specific office using one List Box, i.e. if I select London (using either ‘From’ , ‘To’ or a generic list)  a Table Box would display the first, fourth and fifth rows of the above table.

I have looked at the solution using triggers (http://community.qlik.com/thread/53598), but this seems to depend on returning the field index or the ‘available’ options from the second field, neither of which satisfy my needs.

Could someone please tell me if this is possible, or do I have to select London twice (once from a ‘From’ List Box and once from a ‘To’ List Box) to return all the London rows.

Regards

Jason

1 Solution

Accepted Solutions
hic
Former Employee
Former Employee

You can add a second table in the script using

GenericCity:

Load From as City, TransactionID, 'From' as Type Resident Data;

Load To as City, TransactionID, 'To' as Type Resident Data;

and then use the field "City" for your selections. You do need a TransactionID, though, but this can easily be created in the first table using

RecNo() as TransactionID

HIC

View solution in original post

2 Replies
hic
Former Employee
Former Employee

You can add a second table in the script using

GenericCity:

Load From as City, TransactionID, 'From' as Type Resident Data;

Load To as City, TransactionID, 'To' as Type Resident Data;

and then use the field "City" for your selections. You do need a TransactionID, though, but this can easily be created in the first table using

RecNo() as TransactionID

HIC

Not applicable
Author

Henric,

I think I was over complicating it!

Thanks for your help.

Jason