Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Don't miss the upcoming Q&A with Qlik session on Qlik Application Automation on November 16th! REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
1adam_haj
Contributor III
Contributor III

Load if match value from table

Hello, I have two tables:

1) Document table

DocumentValueVersion
20Z00151
20Z00172

 

2) Last Version of document

DocumentLast_version
20Z0012

 

And I want load data only from the last version of the document. Can I make some exeptional LOAD where i could load only rows where Version matches Last version from another table ? 

Labels (3)
1 Solution

Accepted Solutions
lironbaram
Partner
Partner

hi 

yes you can 
something like this will work 

latestversions:
Load Document,
     Last_version,
     Document & '_' & Last_version as docKey
from XXX;

Data:
Load * 
From YYY
where exists(docKey,Documnet & '_' & Version);

View solution in original post

2 Replies
lironbaram
Partner
Partner

hi 

yes you can 
something like this will work 

latestversions:
Load Document,
     Last_version,
     Document & '_' & Last_version as docKey
from XXX;

Data:
Load * 
From YYY
where exists(docKey,Documnet & '_' & Version);

View solution in original post

Vegar
MVP
MVP

This would solve your issue.

[Final table]:
Load 
   Document,
   Last_version as Version
From LastVersion_Soure
;

Left join ([Final table])
Load *
From  DocumentTable_Source
;

Plees ekskuse my Swenglish and or Norweglish spelling misstakes