Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi friends,
I have taken nested if conditions and when I am taking Listbox for Buckets field I did not get the Future column in List box.
if(Bucket=1,'0-30',if(Bucket=2,'31-60',if(Bucket=3,'61-90',if(Bucket=4,'91-120',if(Bucket=5,'121-180',if(Bucket=6,'181-360',if(Bucket=7,'361-540',if(Bucket=8,'Over540')))))))) as Buckets
Please help me. Its Urgent.
Thanks,
Chandu
if(Bucket=1,'0-30',if(Bucket=2,'31-60',if(Bucket=3,'61-90',if(Bucket=4,'91-120',if(Bucket=5,'121-180',if(Bucket=6,'181-360',if(Bucket=7,'361-540',if(Bucket=8,'Over540',if(Bucket=9,'Future')))))))) as Buckets
I took like this query but it is not working
if(Bucket=1,'0-30',if(Bucket=2,'31-60',if(Bucket=3,'61-90',if(Bucket=4,'91-120',if(Bucket=5,'121-180',if(Bucket=6,'181-360',if(Bucket=7,'361-540',if(Bucket=8,'Over540',if(Bucket=9,'Future'))))))))) as Buckets
You are missing a bracket on this
Another option you have for this rather than a nested if like that is an apply map
GroupMap:
Load * inline [
single, group
1,0-30
2,31-60
3,61-90
4,91-120
5,121-180
6,181=260
7,361-540
8,Over540
9,Future
];
Data:
Load
Applymap('GroupMap',Bucket) AS Buckets
......
hope that helps
Joe
ApplyMap is the best option in this type of problem ... when you know all the values and their required values. .. as suggested above you can go with Applymap.