Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

class() explain them in qlikview

hi friends,

      explain the class() function in qlikview

8 Replies
Anonymous
Not applicable
Author

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

Anonymous
Not applicable
Author

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

SunilChauhan
Champion
Champion

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'

Sunil Chauhan
Not applicable
Author

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.

sc_147321.png

its_anandrjs

Hi,

About Class function check this post

http://community.qlik.com/message/680732#680732

Regards

Anand

Not applicable
Author

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'

Not applicable
Author

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

robert_mika
Master III
Master III

Listbox--->Field-->Expression

Type

=class(Age,10,'Age',11)

This is the closer you can get

10-Apr-15 8-48-35 AM.jpg

You can change the expression to

=class(Age,10,'Age',10) to have bucket every 10 years

10-Apr-15 8-53-01 AM.jpgS

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