Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Selecting fields in one table based on selected fields from another table

Hi everyone,

I have a question that seems fairly straightforward but is giving me a headache.

I have two straight tables in my Qlikview dashboard with dimension fields that I would like to link together. Each dimension comes from a different data source, but they share many of the same values.

Is there an easy way to link these dimensions together? I would like to be able to select an individual/range of values from one table and have that same individual/range be selected in the other table.

I tried linking these two tables together by using a join statement in the script, but that did not seem to work.

The two tables I am trying to link are in the screenshot below. The dimension is labeled 'Route'.

Thanks!

Michael

link_tables.png

4 Replies
JonnyPoole
Former Employee
Former Employee

Seems like a data modelling issue that is similar to when you have multiple dates.

You could add a link table with values from both.  You would use Route1 and Route2 in the respective charts, but use 'Route' as a list box to select a route that you want to filter both tables on 1 or more route values.

Is this enough to help ?   ps: it doesn't take into account how these tables are joined currently in your model which is important. You may need to post your table view diagram

DataSource1:

load

     Route as Route1

     Route

from <DataSource1>

DataSource2:

load

     Route as Route2

     Route

from <DataSource2>

LinkTable:

load

     Route

resident DataSource1;

concatenate (LinkTable)

Load

     Route

resident DataSource2;

Anonymous
Not applicable
Author

Thanks for the tip Jonathan, I think that will be a good start.

Here is the table view diagram for these two tables. LinesToPick is the data source for the first table and RouteMaster is the data source for the second table.

Currently, these two table are not joined. lines_ROUTE and rm_ROUTE are the two fields I would like to match together.

link_tables_data_source.png

mark_casselman
Creator
Creator

If I understand the problem  correctly, you just have to make sure both tables have the same fieldname for the route code and QV will link them automaticaly.

please try this:

Noconcatenate

LinesToPick2:

LOAD lines_ROUTE as ROUTE, *

Resident LinesToPick;

drop field lines_ROUTE;

drop table LinesToPick;

Noconcatenate

RouteMaster2:

LOAD rm_ROUTE as ROUTE, *

Resident RouteMaster;

drop field rm_ROUTE;

drop table RouteMaster;

Because both tables now have a field named ROUTE, they will be linked.

Ok ?

Anonymous
Not applicable
Author

Mark-- that appears to do the trick.

I will mess around with it a bit more to confirm all of the data are correct.