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: 
spook2020202
Contributor III
Contributor III

Filtering a table using Filter Pane

Hi,

I'm very new to qlik and having some issues trying to filter table visual. I'm coming from an SQL background so find this a little confusing compared to my normal stuff.

I have 2 tables of data, which are loaded with football (soccer) data.
Standings (Just a league table showing the teams and their position in the league):
image.png
Fixtures (A list of historic and upcoming matches):
image.png

What i'm trying to do is have a filter pane with the team name and league position and when either a team (single or multiple) or a position (single or multiple) is clicked, it should filter the fixtures table to only show fixtures for the selected team (or team the occupies the selected position).

EG, Arsenal are 5th in the league, If I selected "5" from the filter pane, it should only show games where arsenal are playing (home or away).
image.png

If 5 and 15 are selected, then it should only show games where BOTH 5 and 15 (arsenal and burnley) are playing, so:
image.png

I've been trying to get this working for many hours using both guides and other posts on the forum but to no avail. 
Can anyone show how to filter one data source based on the selections of a different one (the common key here being TeamName)
Any help would be appreciated.
Thanks

1 Solution

Accepted Solutions
ajaykakkar93
Specialist III
Specialist III

hi,

You can try using set Like this if u want to filter out using your own filter,

Sum({<match_hometeam_name=P(teamfilter)>}match_awayteam_score)

Check the attached File

You need to improve your modelling.

1.PNG2.PNG

 

Please mark the correct replies as Solution. Regards, ARK
Profile| GitHub|YouTube|Extension|Mashup|Qlik API|Qlik NPrinting

View solution in original post

7 Replies
dplr-rn
Partner - Master III
Partner - Master III

If i understand correctly Issue is when league position is selcted.
how is league position loaded/calculated?
Share the app if you can
spook2020202
Contributor III
Contributor III
Author

All of the data in the app is loaded in from an external API so no calculations are done; It's simply imported.
The main thing i need is to be able to select a league position and the fixtures table should filter to only show teams that occupy that position; My issue is that the position is in a different table/datasource and i dont know how to tell Qlik to filter the Fixtures table using my selection. I'm assuming this must be a very common request but havent been able to find a solution.

App attached.

dplr-rn
Partner - Master III
Partner - Master III

you data model is flawed. the link (keys) between standings table to the fixtures table is just league details. i.e. you select a league standing filter in fixture table nothing is filtered apart from country_name,league_id,league)name

You need to model it correctly so that it flows logically
spook2020202
Contributor III
Contributor III
Author

Thanks for the feedback Dilipranjith,

When you say it is flawed what do you mean or what should a successful model look like in this instance?
For me to be able to select a League Position in the Standings table and have the upcoming fixtures filter to only my selections, what would I need to know (what do i need to learn to do) to make it work?

The data comes from an API which I have no control over so I assume you mean the data will need to be corrected prior to being used in Qlik. any hints on what this model should look like would be appreciated.

Thanks.

dplr-rn
Partner - Master III
Partner - Master III


@spook2020202 wrote:

When you say it is flawed what do you mean or what should a successful model look like in this instance? Think of it logically if your standings table is not connected correctly to fixtures table you will not get what you are looking for. ignore qlik. Walk through it as if you are finding data using the 2 excel tables
For me to be able to select a League Position in the Standings table and have the upcoming fixtures filter to only my selections, what would I need to know (what do i need to learn to do) to make it work?

The data comes from an API which I have no control over so I assume you mean the data will need to be corrected prior to being used in Qlik. any hints on what this model should look like would be appreciated.

hard to answer as i dont know full scale of what you are trying to achive. in my opinon you need to integrate (rename or join the tables) teamfilter into both fixture and standings table.

Thanks.


 

ajaykakkar93
Specialist III
Specialist III

hi,

You can try using set Like this if u want to filter out using your own filter,

Sum({<match_hometeam_name=P(teamfilter)>}match_awayteam_score)

Check the attached File

You need to improve your modelling.

1.PNG2.PNG

 

Please mark the correct replies as Solution. Regards, ARK
Profile| GitHub|YouTube|Extension|Mashup|Qlik API|Qlik NPrinting

spook2020202
Contributor III
Contributor III
Author

Thanks for the help all. 
I switched to a different API which has a much better schema and it's made a world of difference and I now have all of my filters working as expected.