Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
udaypullela
Contributor
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
Specialist III
Specialist III

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.

View solution in original post

2 Replies
mdmukramali
Specialist III
Specialist III

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.
Vegar
MVP
MVP

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