Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

vaisgaard
New Contributor

Qlik Sense: Fetching data into fact table with filtered queries

Hi,

I want to be able to build a fact table in Qlik Sense, where I collect data from different data sources. When fetching data from the data sources I want to limit the queries to the base structure of my fact table to limit data to a minimum.

Example:

Base structure of fact table

user_idname
scjoScarlett Johansen
brpiBrad Pitt
tohaTom Hanks
anjoAngelina Jolie
madaMatt Damon

Sales table

user_idsales
scjo553
toha625
anjo125
brpi485

Budget table

user_idbudget
scjo500
brpi700
toha300
anjo

150

mada250

Sales meetings table

user_idmeeting_date
brpi2017-01-20
brpi2017-02-03
toha2017-03-10
anjo2017-03-22

The source tables will in reality contain a lot of data on other user_ids, so I need to filter on only the employees in my fact table.

How to do this?

Hope you guys can help.

2 Replies
vinieme12
Esteemed Contributor II

Re: Qlik Sense: Fetching data into fact table with filtered queries

I think KEEP is what will help you in this scenario

Look at the example on using keep here

Understanding Join, Keep and Concatenate

vinieme12
Esteemed Contributor II

Re: Qlik Sense: Fetching data into fact table with filtered queries

For Example try below

FACT

LOAD * inline [

user_idname
anjoAngelina Jolie
brpiBrad Pitt
madaMatt Damon
scjoScarlett Johansen
tohaTom Hanks

];

INNER KEEP



table2

load * inline [

user_id
anjo
brpi
mada
scjo
toha

];

Drop table table2;

after this you will only have FACT data for ID's specified in table2