Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
n1ef5ng1
Creator
Creator

Class()

Hi I am using this function call Class where it will categorize the value into groups

say if my value output is 0 4 5 6 7 8 8 8 9 10 30

It will categorize to

0-3  -- 1

4-6  -- 3

7-9  -- 5

etc

using the function class(value,3)

However my value do contain negative such as -4 -7 -12 0 4 5 6 7 8 8 8 9 10 30

I would like all the negative to categorize to 0 and the rest will be 1-3 etc etc. how can this be done? i tried using this expression but it group all the negative to 0-3

 

=

if(Tranship_Dwell < 0,'0',

Class(ceil(ceil(Tranship_Dwell/1440)) ,$(var_Dwell)
))

1 Solution

Accepted Solutions
n1ef5ng1
Creator
Creator
Author

Solved

 

=

if(Tranship_Dwell < 0,'0',
Class(ceil(ceil(Tranship_Dwell/1440)) ,'5','x','1'))

View solution in original post

2 Replies
n1ef5ng1
Creator
Creator
Author

Solved

 

=

if(Tranship_Dwell < 0,'0',
Class(ceil(ceil(Tranship_Dwell/1440)) ,'5','x','1'))

nagasekhar
Contributor III
Contributor III

1. what is this 1440

 

2.why you typed '5','x','1'

what is the meaning of this