Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Our next Qlik Insider session will cover new key capabilities. Join us August 11th REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to associate a Qualify Tables in QV Data Model?

Hi,

I have an application where I am using Qualify and Unqualify functions in script. Because of Qualify and Unqualify functions, one of the tables is not able to associate with Original table on some other field. Is there any way to associate it?

I tried changing the name of distinct table attribute on which I need to associate it with original table, but I am unable to run the script. How to tackle this?

Abhijit

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Try this:

QUALIFY *;

UNQUALIFY NOTICE, CPSC;

OriginalTable:

LOAD *, RecNo() AS RecID Resident JSR_Notice_With_Parts;

DistinctTable:

LOAD Distinct * Resident JSR_Notice_With_Parts;

UNQUALIFY *;

Inner Join (DistinctTable)

LOAD NOTICE ,

     FirstSortedValue(DISTINCT CPSC, -Count) AS  CPSC

GROUP BY NOTICE;

LOAD NOTICE, CPSC, Count(CPSC) AS Count

Resident JSR_Notice_With_Parts

Group By NOTICE, CPSC;

DROP Table JSR_Notice_With_Parts;

...etc...


talk is cheap, supply exceeds demand

View solution in original post

7 Replies
sunny_talwar

Can you share the script you are using and the field you want to connect on from the Qualified table?

rupamjyotidas
Specialist
Specialist

You need to un-qualify the field you are associating

Foe Eg:

Qualify *;

UnQualify [Associating Field Name];

Not applicable
Author

Thanks you for your reply. Here is my script and sample data.

On selection of dates in Scroll bar it should filter the data in table 2 as it is filtering the data in table 1.

Abhijit

Gysbert_Wassenaar

Try this:

QUALIFY *;

UNQUALIFY NOTICE, CPSC;

OriginalTable:

LOAD *, RecNo() AS RecID Resident JSR_Notice_With_Parts;

DistinctTable:

LOAD Distinct * Resident JSR_Notice_With_Parts;

UNQUALIFY *;

Inner Join (DistinctTable)

LOAD NOTICE ,

     FirstSortedValue(DISTINCT CPSC, -Count) AS  CPSC

GROUP BY NOTICE;

LOAD NOTICE, CPSC, Count(CPSC) AS Count

Resident JSR_Notice_With_Parts

Group By NOTICE, CPSC;

DROP Table JSR_Notice_With_Parts;

...etc...


talk is cheap, supply exceeds demand

View solution in original post

Not applicable
Author

Thank You Gysbert. I could associate it with the original model.

Abhijit

Not applicable
Author

Thank You Rupam. It was helpful.

sudeepkm
Specialist III
Specialist III

Qualify *;

Unqualify <AssociativeFieldName>;

Load script; // Table Load script where you want to qualify field names other than  <AssociativeFieldName>

Unqualify *; // need to put this at the end of load script otherwise the next table load script will take it as qualify.