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: 
ashmitp869
Creator II
Creator II

Assistance required in qlikview script

Hi there,

I am trying to achieve the below join in the qlikview data model.

join1.PNG

 

When I join the new table GP , It became with table name prefix -

join2.PNG

Please kindly assist me in the qlikview script.

Here is the script below :

ED_AP_PAT_TMP:
NoConcatenate
LOAD DISTINCT
[Person Area Uid],_VisitKey, [Facility Identifier], 'Yes' as [Exclude Discharged Stay]
Resident ED;
Concatenate (ED_AP_PAT_TMP)
LOAD
[Person Area Uid],_VisitKey, [Facility Identifier], if([AP._discharge_flag] = 1, NULL(), 'Yes') as [Exclude Discharged Stay]
Resident AP;




ED_AP_PAT:
NoConcatenate
LOAD DISTINCT *
RESIDENT ED_AP_PAT_TMP;

DROP TABLE ED_AP_PAT_TMP;

ED_AP_PAT_TMP1:
Concatenate (ED_AP_PAT)
LOAD
[Person Area Uid],_VisitKey, [Facility Identifier], 'Yes' as [Exclude Discharged Stay]
Resident GP;

 

DROP FIELD [Person Area Uid],[Facility Identifier] FROM ED;
DROP FIELD [Person Area Uid],[Facility Identifier] FROM AP;
DROP FIELD [Person Area Uid],[Facility Identifier] FROM GP;

 

regards

1 Solution

Accepted Solutions
Lisa_P
Employee
Employee

But if you did Qualify *; somewhere earlier in your script, it will apply until your Unqualify *;

View solution in original post

7 Replies
Lisa_P
Employee
Employee

Are you using Qualify in your script ?

ashmitp869
Creator II
Creator II
Author

No, I remove the Qualify .

and Put Unqualify * but not working

Lisa_P
Employee
Employee

can you show more of your script to let us see what's happening

ashmitp869
Creator II
Creator II
Author

ED_AP_PAT_TMP:
NoConcatenate
LOAD DISTINCT
[Person Area Uid],_VisitKey, [Facility Identifier], 'Yes' as [Exclude Discharged Stay]
Resident ED;
Concatenate (ED_AP_PAT_TMP)
LOAD
[Person Area Uid],_VisitKey, [Facility Identifier], if([AP._discharge_flag] = 1, NULL(), 'Yes') as [Exclude Discharged Stay]
Resident AP;
Concatenate (ED_AP_PAT_TMP)
LOAD
[Person Area Uid],_VisitKey, [Facility Identifier], 'Y' as [Exclude Discharged Stay]
Resident GP;

UNQUALIFY *;

ED_AP_PAT:
NoConcatenate
LOAD DISTINCT *
RESIDENT ED_AP_PAT_TMP;

DROP TABLE ED_AP_PAT_TMP;

DROP FIELD [Person Area Uid],[Facility Identifier] FROM ED;
DROP FIELD [Person Area Uid],[Facility Identifier] FROM AP;
DROP FIELD [Person Area Uid],[Facility Identifier] FROM GP;

Lisa_P
Employee
Employee

There must be a Qualify earlier in the script that is qualifying each [Exclude Discharged Stay]

ashmitp869
Creator II
Creator II
Author

Hi Lisa ,

the field  [Exclude Discharged Stay] is created on this tab for the first time by this script , so I ne ver Qualify [Exclude Discharged Stay] before the script.

ED_AP_PAT_TMP:
NoConcatenate
LOAD DISTINCT
[Person Area Uid],_VisitKey, [Facility Identifier], 'Yes' as [Exclude Discharged Stay]
Resident ED;
Concatenate (ED_AP_PAT_TMP)
LOAD
[Person Area Uid],_VisitKey, [Facility Identifier], if([AP._discharge_flag] = 1, NULL(), 'Yes') as [Exclude Discharged Stay]
Resident AP;
Concatenate (ED_AP_PAT_TMP)
LOAD
[Person Area Uid],_VisitKey, [Facility Identifier], 'Y' as [Exclude Discharged Stay]
Resident GP;

Lisa_P
Employee
Employee

But if you did Qualify *; somewhere earlier in your script, it will apply until your Unqualify *;