Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
i want create a bucket like
using inline
if it is <=1 ,1
>1 and <=5 , 2-5
>5 and <=10 ,5-10
];
how to create this using inline
pls give me ?
Can you elaborate more on this and why you need inline for this.
Regards
Anand
Hi,
Have a look at this maybe, similar if statement you are looking at, but as I say in the thread easier to use an applymap
http://community.qlik.com/thread/148849
hope that helps
Joe
HI,
You should give more details because your need is not very clear...
But I think you should do this directly in the graphs:
the dimension will be your number and the expression will be:
if(number<=1,1,
f(number>1 AND number<=5,'2-5','5-10'))
hi, use an nested IF statement, so something like this:
if(field=1,'A',
if(field=2,'B',
if(field=3, 'C',
'D')
)
)
i want get it from inline only how ?
Hi,
Then try this inline mapping code but you have to fill conditional values for bucket have a look inline table and then map this Value field to the source table field value.
Ex:-
MapTab:
Mapping LOAD * Inline [
Value,Bucket Condition
1,<=1
2,>1 and <=5
3,>1 and <=5
4,>1 and <=5
5,>1 and <=5
5,>5 and <=10
6,>5 and <=10
7,>5 and <=10
8,>5 and <=10
9,>5 and <=10
10,>5 and <=10
];
Source:
LOAD ApplyMap('MapTab',Value,'Unknown') as Bucket,Value
From [Source File];
This works if you have few values but assume if there is 1000 values then you have to use loop here.
Regards
Anand