Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

udaypullela
New Contributor

Filter Data by Data Source

Hello Members,

I have a situation where I have 4 databases have 3 tables- Quantity, Company & Products, Every Database lets call them DB1, DB2, DB3, DB4 has the above listed 3 tables. 

I want to be able to fetch these tables from all databases and make 1 Quantity, 1 Company & 1 Products table (which I was able to do).

I should now be able to add a filter to the dashboard to PICK a Database to view the data from.

What should be the approach?

Labels (1)
1 Solution

Accepted Solutions
mdmukramali
Valued Contributor III

Re: Filter Data by Data Source

Hi,

Add a flag in each table to know the data from which table.

Like:

in Quantity Table:
Load *,
'DB1' as Source_Quantity
--------
-----
;

in the second table :
'DB2' as Source_Quantity
------
-----
Like soon.
2 Replies
mdmukramali
Valued Contributor III

Re: Filter Data by Data Source

Hi,

Add a flag in each table to know the data from which table.

Like:

in Quantity Table:
Load *,
'DB1' as Source_Quantity
--------
-----
;

in the second table :
'DB2' as Source_Quantity
------
-----
Like soon.
Partner
Partner

Re: Filter Data by Data Source

FOR each in vRegister 'Quantity, 'Company', 'Products'
FOR each vDB in 'DB1','DB2','DB3','DB4'
//autoconcatenate
[$(vRegister)]:
LOAD *
FROM
$(vDB).dbo.$(vRegister);
NEXT vDB
Store $(vRegister) into $(vRegister).qvd (qvd);

NEXT vRegister
#OnVacation #BetweenJobs.
Please ekskuse my Norglish and Swenglish typos.