Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
any one can explain class field?
Not sure what class field should be, are you talking about class() function?
From the Help file:
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'
Thank you for your answer swuel
If this is what you were looking for, I would suggest closing the thread by marking the swuehl's answer as correct.
Best,
Sunny
If you need more information, there are a couple of samples here in the forum, e.g.
class() explain them in qlikview
Just search for class, the function is also often used with histograms so a search for that might also help.
i'm asking about class() only
If you are looking for an example I have created a sample which uses class() function both in the front end and back end. Back end is in the script:
Table:
LOAD *,
Class(Age, 10) as ClassScript;
LOAD Floor(Rand() * 100) as Age,
If(Rand() <=0.50, 'Male', 'Female') as Gender
AutoGenerate 100000
Front end option uses it in the chart as calculated dimension:
I am attaching the qvw document for you to review.
HTH
Best,
Sunny