Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
vikasmahajan

Class function

Hiii,

Good Morning ,

Can any one please explain me how class function is working  in qlikview with sample demo.

Thanks

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
1 Solution

Accepted Solutions
tresesco
MVP
MVP

While you write : class(23, 10), the classification starts from 0. so the points of intervals become like 0, 10, 20, 30 ... Now your variable (23) comes under the interval 20-30. hence the result.

20<=x<30 ... means your variable(23) belongs to this interval.

hope this helps.

View solution in original post

13 Replies
nagaiank
Specialist III
Specialist III

Qlikview Reference Manual has the following information.

Class_Function.PNG

Siva_Sankar
Master II
Master II

hi, syntax: 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

tresesco
MVP
MVP

For more explanation and examples, have a look http://www.quickqlearqool.nl/?p=725

Edit: and http://community.qlik.com/message/202684#202684

vikasmahajan
Author

Thanks

Is there anyone have qvw I read all this posts but confused abt class

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
Not applicable

try this

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'

vikasmahajan
Author

can u explan me why  var=23 return 20<=x<30

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
tresesco
MVP
MVP

While you write : class(23, 10), the classification starts from 0. so the points of intervals become like 0, 10, 20, 30 ... Now your variable (23) comes under the interval 20-30. hence the result.

20<=x<30 ... means your variable(23) belongs to this interval.

hope this helps.

Not applicable

class( var,10 )

here 10 is interval.

if var =23 , then if your data of field start from 10 then after interval of 10 , 23 lie between 20 to 30.

so
var=23 return 20<=x<30

vikasmahajan
Author

Thanks Sir

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.