Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone,
I am a new Qlikview user.. And I need help...
I am trying to get the record which is bigger than for example 200 in a new field. How can I do this?
For example:
Person:
Load
ID,
Name,
Surname,
if(ID>100, 'under 30 year old', ... ) as Younger30; ----> here I want a new Field that shows under 30 years old people... with Name, ID etc.
SQL Select*
From Person;
Can anybody help me? I just wannt to have a new field with this selection, it is possible to do that?
OK,
So you have to do something like this after your first load script :
Younger30:
LOAD
ID,
ID as IDYounger30,
Name as NameYounger30,
Surname as SurnameYounger30
RESIDENT Person
WHERE Younger30 = 'under30 year old';
Hope that helps you.
Martin
Hi,
I'm not sure to understand what you want ?
did you mean :
if(ID>200, ID) as RecordBigger200
Hope that helps you,
Martin
You are in the right track. The script, if I understand you correctly, will be:
Person:
Load ID,
Name,
Surname,
if(ID>100, 'under 30 year old',if(ID>200,'60+,'Other')) as Younger30;
SQL Select*
From Person;
First, Thank you for your help. I know how if - clause is working... Sorry, that I didn't explain correctly....
what I mean is:
with the new selection... ( if then else) I would like to create in the table or in a new table a new field, which just shows the years under 30 years old.
OK,
So you have to do something like this after your first load script :
Younger30:
LOAD
ID,
ID as IDYounger30,
Name as NameYounger30,
Surname as SurnameYounger30
RESIDENT Person
WHERE Younger30 = 'under30 year old';
Hope that helps you.
Martin
Thank you !!!!