Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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?
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)).
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).
" I want QlikView to just load about 10 persons (who were identified with a person-ID earlier):"
Where Exists(person-ID)
-Rob
Works, thank you!
works, thank you!