Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am new to Qlikview, My requirement is:
I have a table Called age.
Age:
LOAD * INLINE [
Age
11
11
16
18
19
20
21
26
28
29
30
35
38
40
42
48
50
52
60
];
Now I want create a Bucket Using class Function in Listbox, Can please let me know. Step by step.
Requirement is like:
List Box:
Age
11-20 | 21-30 |31-40 | 41-50 | 51-60 Like this type i need.
Thanks,
Kumor
Use class fucntion
Dual(Replace(Class(Age,10),'<= x <','to'), Num(Class(Age,10))) as Bucket
Script should be :
BUCKET:
LOAD * INLINE [
Age
11
11
16
18
19
20
21
26
28
29
30
35
38
40
42
48
50
52
60
];
load *,
Dual(Replace(Class(Age,10),'<= x <','to'), Num(Class(Age,10))) as Bucket
resident BUCKET;
Listbox--->Field-->Expression
Type
=class(Age,10,'Age',11)
This is the closer you can get
You can change the expression to
=class(Age,10,'Age',10) to have bucket every 10 years
S
Age- is your field
10- is the bucket (every 10
'Age' is the text you can have between(you can change that to anything you like)
10- number where you want to start from
Hi ,
By using Class Function we can solve this Problem.
EX:
In List Box >>> Properties >> Field>>>Expression>>>Class(Age,Range,'Age',Range+1)
Regards,
Nagarjuna
Hello Reddy,
Create a ListBox, in the General tab select Expression in field dropdown and write
=Class(Age,10,'Age',11)
as an expression.
This will give you the below result:
Since the upper limit is not included in the range that's why the result says Age >=11 and <21
and that upper limit is included in the next range which says Age >=21 and <31
Thanks Ashwani Kumar
Thanks to all.
Can you guys suggest me What type scenarios We can use ? What is the Use? Why ? is there any limitations?
The class function is mostly used when you need to calculate the aging of your inventory. In simple words when you need to check that the items or products which you have are how much old, so that you can take better decisions that whether you need to discard those too old items or how to sell them.
Also, when you need to make a range for students' marks, to identify in which score range the student fall.
Awesome function with the help of which you can make range buckets on the fly.
I agree with your terms, Can you tell me in Advanced Level, Present u told me that, i think as Beginner Level, Kindly Give Bit Explanation in Advanced Script Level.
Thank you