Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

Function CLASS

Good Afternoon, I created an interval group using the function CLASS, but when I got the detail of certain group I could see that it did not consider a value that It had to match with this one. The value is counting for the previous group.CLASS.png

I am attaching an image of the table of the group, and the detail.

Tags (1)
8 Replies
jsaradhi
Not applicable

Re: Function CLASS

is that because of rounding? how many decimal values are there in your data? you may want to check for this case - 0.74999 would be rounded off as 0.7500 if you were to show only 4 decimals but it actually is less than 0.75 - just something to consider.

MK_QSL
Not applicable

Re: Function CLASS

Provide sample document or share your apps...

Or provide the dimension and expression you have used.

Not applicable

Re: Function CLASS

My dimension is class(index,0.05) and expression a simple count.

Enviado desde Yahoo Mail en Android

De:"Manish Kachhia" <qcwebmaster@qlikview.com>

Fecha:Vie, Feb 27, PM a 5:39 PM

Asunto:Re: - Function CLASS

Function CLASS

reply from Manish Kachhia in Scripting - View the full discussion

Provide sample document or share your apps...

Or provide the dimension and expression you have used.

Reply to this message by replying to this email, or go to the message on Qlik Community Start a new discussion in Scripting by email or at Qlik Community

© 1993-2014 QlikTech International AB | Copyright & Trademarks | Privacy | Terms of Use | Software EULA

maxgro
Not applicable

Re: Function CLASS

I tried in a small example

load

  Rand() as index,

  1 as exp

AutoGenerate 100;

load 0.7500000 as index, 1 as exp AutoGenerate 1;

load 0.7500001 as index, 1 as exp AutoGenerate 1;

load 0.7499999 as index, 1 as exp AutoGenerate 1;

0,75 is in the correct class

1.jpg

jsaradhi
Not applicable

Re: Function CLASS

nice...on the same token, 0.7499999 is not in 0.75 <= x <= 0.8 class which is what i was saying. if he rounds his values to 4 decimals then 0.74999999 would be displayed as 0.7500 but it is actually less than 0.75 and would not be in the same class as 0.75 <= x <= 0.8...typing the following into a textbox for example

=num(0.7499999, '#.###0')<0.75

Not applicable

Re: Function CLASS

I was thinking that it could be for that, but my result is not rounded. It is 0.75 exactly.

I did another exercise using intervalmatch and I got the same result. It same that the range is 0.70 < x <= 0.75.

Here are my interval match table and the result:

DesdeHastaRango
0,30,350,30 - 0,35
0,35010,40,35 - 0,40
0,40010,450,40 - 0,45
0,45010,50,45 - 0,50
0,50010,550,50 - 0,55
0,55010,60,55 - 0,60
0,60010,650,60 - 0,65
0,65010,70,65 - 0,70
0,70010,750,70 - 0,75
0,75010,80,75 - 0,80
0,80010,850,80 - 0,85
0,85010,90,85 - 0,90
0,90010,950,90 - 0,95
0,950110,95 - 1

Thanks to all for your help.

jsaradhi
Not applicable

Re: Function CLASS

so is the count for the previous class/interval one more than what it should be? may be posting a sample qvw with the issue will help address this.

Not applicable

Re: Function CLASS

I am attaching the qvw and excel interval match