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

Filtering disjoint tables based on common field

Hi,

I have a scenario in which there are 2 tables that share a lot of common fields. They do not share a common name but their values are same. Eg. Tab1_Col and Tab2_Col are 2 columns that have same values in them. 

The tables are at different granularity and we cannot join them directly. So the two tables are distinct and separate and dis-joined.

There are 2 bar charts(Chart1 and Chart2) that show values from the 2 tables separately.

Now, I have a list with values from Tab1_Col. If I choose values from this list then the Chart1 is filtered and Chart2 is unaltered.

My question: is there a way to filter Chart2 also based on selection of Tab1_Col ?

Thanks,

Gokul

2 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

You can do this, but probably should not. I think that you need to design your data model to better suit the way Qlikview works. You have two options that come to mind.

Option1 - concatenate the tables and alias the comparable names to the same name. Also add a Source field to differentiate between the tables. This is what I would try first if the majority of the fields "mean the same thing"

    CombinedData:

     LOAD Col

     ...

          'Tab1' As Source

     FROM Tab1....

     Concatenate(CombinedData)

     LOAD Col

     ...

          'Tab2' As Source

     FROM Tab2....

    

For the 2 charts, use the Source field in a set expression - eg Sum({<Source={'Tab1'}>} Sales)

Now if you make selections for Col, the filter will apply to both charts.

Option2 - create a link table containing the common fields. This is an option if there are many fields that are not common. There are many posts in the community on link tables. The link table will contain all the fields from both tables that have a common meaning.

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Hi Jonathan, But is there a way to do this at the report level? Maybe create an expression to filter based on selection?