Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi friends,
explain the class() function in qlikview
Hi medi,
The basic function of class() is to determine set of static intervals/limits as reqd.
You can give different lower and upper limits.
Thanks,
Vignesh
Hi
class function is used to get the band of a particular filed
Use the expression like
ex:
Age field consist the data like from 20 year to 90 years if u use the class filed to retrieve the age with band of 10
=Class(Age,10)
Output:
10<x<20
20<x<30
.
.
.
.
80<x<90
Class is alternative method to if to creates age or buckets. see below
class(expression, interval [ , label [ , offset ]])
Creates a classification of expressions. The bin width is determined by the number set as interval. The result is shown as a<=x<b, where a and b are the upper and lower limits of the bin. The x can be replaced by an arbitrary string stated in label. 0 is normally the default starting point of the classification. This can be changed by adding an offset.
Examples:
class( var,10 ) with var = 23 returns '20<=x<30'
class( var,5,'value' ) with var = 23 returns '20<= value <25'
class( var,10,'x',5 ) with var = 23 returns '15<=x<25'
Class make buckets to better analyze the data. for Age expression in this chart I used:
=replace(class(Age,5),'<= x <',' to ')
tip: note that I used replace string function to convert the output 35 <= x < 40 to a more user friendly 35 to 40.
Creates a classification of expressions. The bin width is determined by the number set as interval. The result is shown as a<=x<b, where a and b are the upper and lower limits of the bin.The x can be replaced by an arbitrary string stated in label. 0 is normally the default starting point of the classification. This can be changed by adding an offset.
Examples:
class( var,10 ) with var = 23 returns '20<=x<30'
class( var,10,'x',5 ) with var = 23 returns '15<=x<25'
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
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