Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Struck with the below aging bucket.
I have to classify <=30 ,>30,31-60
its a simple if is not going to multiple loops.
if(age<=30,'less than 30',
if(age>30,'greater than 30',
if(age>30 and age <60,'between 30 and 60')))
Problem here is once age goes to age>30, it doesn't go the next if.
How to deal this situation?
Any suggestions?
You would need to create a table with multiple records for the same age, assigning different classes (Like a link table).
LOAD
age,
if(age<=30,'less than 30','greater than 30') as Class
FROM ...
CONCATENATE
LOAD
age,
'between 30 and 60' as Class
FROM ...
WHERE age > 30 and age <60;
edit: corrected second load
Why do you assign two text to single value? If a Age = 45 you want it to be called greater than 30 and between 30 and 60 at the same time?
try this
if(age<=30,'less than 30', A1,
if(age>30,'greater than 30',A2
if(age>30 and age <60,'between 30 and 60' )))as A3
try to create in backend script and u will get flags in front end.
You would need to create a table with multiple records for the same age, assigning different classes (Like a link table).
LOAD
age,
if(age<=30,'less than 30','greater than 30') as Class
FROM ...
CONCATENATE
LOAD
age,
'between 30 and 60' as Class
FROM ...
WHERE age > 30 and age <60;
edit: corrected second load
QlikView has a function class() that can group data into equal size bands in a simple command.
For different size bands then you will need to use if statements.
Just remember to make your column wide enough to see the results
I was also thinking same. Let me try and reply back to this post.
Thank Swuehl