8 Replies Latest reply: Mar 2, 2015 4:19 PM by Leonardo Lopez RSS

    Function CLASS

    Leonardo Lopez

      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.

        • Re: Function CLASS
          Saradhi Balla

          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.

          • Re: Function CLASS
            Manish Kachhia

            Provide sample document or share your apps...

            Or provide the dimension and expression you have used.

              • Re: Function CLASS
                Leonardo Lopez

                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

              • Re: Function CLASS
                Massimo Grossi

                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

                  • Re: Function CLASS
                    Saradhi Balla

                    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