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

Announcements
Mastering Change Data Capture: Read Now
cancel
Showing results for 
Search instead for 
Did you mean: 
jakobjosef
Creator II
Creator II

2 LImitations/Restrictions for 1 qvd-file

Hello dear QV-Community,

I would like to ask for help concerning following problem:

my problem:

I am loading a qvd-file for staff-planning. Since I just want to know the current year (2018), my script looks like:

$(v21_Datamodel_QVD)DimPersPlanungsdaten.qvd(qvd)

where year (([datum (pzdnkal.datum)]))=2018

But like this, i get the staff-planning of the whole company. I want QlikView to just load about 10 persons (who were identified with a person-ID earlier):

LOAD

[fnr (pzdnkal.fnr)] &'|'&[pnr (pzdnkal.pnr)] as Pers_ID1,


my question:

Is there a command which I can use for limit the year (to 2018) AND like 10 person-IDs (e.g.Pers-ID 556,557,558 etc.)?

I tried like:

LOAD

[fnr (pzdnkal.fnr)] &'|'&[pnr (pzdnkal.pnr)] as Pers_ID1,

Date,

etc...


from

$(v21_Datamodel_QVD)DimPersPlanungsdaten.qvd(qvd)

where year (([datum (pzdnkal.datum)]))=2018 &

where Pers_ID1 = 555,556,557,558,559....

I hope that there is a simple solution for this problem.


Thank you very much and greetings from vienna,

Jakob

6 Replies
jakobjosef
Creator II
Creator II
Author

maybe i found a solution:

from

$(v21_Datamodel_QVD)DimPersPlanungsdaten.qvd(qvd)

where year (([datum (pzdnkal.datum)]))=2018

AND where Pers_ID1 = '555'

or Pers_ID1 = '556'

or Pers_ID1 = '557'

...



but isnt there a shorter way?

neelamsaroha157
Specialist II
Specialist II

you can use Match function like - Match(Pers_ID1, '555', '556','557' and other values).


Another easier way would be to use a variable - define a variable with Set function and use that variable in the match function like-

Set vVar = '555','556','557'....;

Match(Pers_ID1, $(vVar)).

neelamsaroha157
Specialist II
Specialist II

And there will be only one where Caluse

from

$(v21_Datamodel_QVD)DimPersPlanungsdaten.qvd(qvd)

where year (([datum (pzdnkal.datum)]))=2018

AND where Pers_ID1 = '555'

or Pers_ID1 = '556'

or Pers_ID1 = '557'

...

Like this -

where year (([datum (pzdnkal.datum)]))=2018

AND Match(Pers_ID1, '555', '556','557' and other values).

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

" I want QlikView to just load about 10 persons (who were identified with a person-ID earlier):"


Where Exists(person-ID)


-Rob

jakobjosef
Creator II
Creator II
Author

Works, thank you!

jakobjosef
Creator II
Creator II
Author

works, thank you!