Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
newqlik2017
Creator II
Creator II

How to: Pass results of query 1 into query 2

Hello,

Is it possible to pass the aggregated metric AMOUNT value from query 1 into query 2 that has additional fields but not the AMOUNT ? When a user makes a filter selection, the AMOUNT column should be reflected in the detail for each columns from query 2.

Table 1 has the aggregated Amount at Dim1/Dim2/Account level

Table 2 has the other fields but no Amount.

Filters to be used are: Dim1, Dim2, Account, State, County, City, Zip

Please see data set below for example. I also attached a qvw for reference.

   

Dim1Dim2AccountAmount
AgricultureAAAA1111000
EducationAAAA1122500
RetailAAAA1134500
AgricultureBBBB2112000
EducationBBBB2123500
RetailBBBB2135000

   

Dim1Dim2AccountStateCountyCityZip
AgricultureAAAA111NYAC1ManhattanA101
AgricultureAAAA111PAAC2PittsburghA201
EducationAAAA112CAEC1Los AngelesA301
RetailAAAA113NYRC1ManhattanA401
RetailAAAA113FLRC1MiamiA501
RetailAAAA113FLRC2OrlandoA502
RetailAAAA113NJRC1EdisonA601
AgricultureBBBB211CAAC1Los AngelesB101
EducationBBBB212NYEC1BrooklynB201
EducationBBBB212CAEC1HollywoodB301
EducationBBBB212CAEC2San FransicsoB302
RetailBBBB213PARC1PittsburghB401
RetailBBBB213PARC1PhiladelphiaB402
RetailBBBB213PARC2ErieB403
RetailBBBB213PARC3HarrisburghB404
3 Replies
Lisa_P
Employee
Employee

Hi Subash,

I'm not exactly sure what you are looking for here.

I've just added in a straight table and a pivot table to your list boxes and table boxes.

Hope it helps.

newqlik2017
Creator II
Creator II
Author

Hi Lisa,

Thank you for your response.

In your qvw, for example, if you select Agriculture from Dim1, the total amount is 1000. Now, if you look for the same across state or county or zip, the total amount is always 1000; however, I'm looking for a breakdown of that 1000 by state, county, zip or whatever filter is selected.

Hope this makes sense.

qlikwiz123
Creator III
Creator III

Hi,

I am not sure if I understood the question. But if you are looking at Dim1 - Agriculture and Dim2 - AA, there is NY and PA in states and Manhattan and Pittsburgh in the City.

Since the data doesn't show the Agriculture-AA amount split between these two States or Cities, it is not possible to divide that 1000 among these.

If that is not something you are looking for, please let us know the requirement with some more information.