Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
pedromsouza
Creator
Creator

"Class-like" function

Is there a function that works like "class", but instead of '20<=x<30', '30<=x<40'... would give me just the max? 30, 40...


I tried right(class(expression)) but it didn't work.

Qliking since '09
1 Solution

Accepted Solutions
Frank_Hartmann
Master II
Master II

perhaps like this:

right(class(expression,10),2)


or better:


subfield(class(expression,10),'<',3)

View solution in original post

5 Replies
Frank_Hartmann
Master II
Master II

perhaps like this:

right(class(expression,10),2)


or better:


subfield(class(expression,10),'<',3)

pedromsouza
Creator
Creator
Author

Thanks Frank. It worked with "right".

if(num(right(class(EXP,8),2))=0,1,num(right(class(EXP,8),2)))

Qliking since '09
Frank_Hartmann
Master II
Master II

but be aware that this function only works if the max intervall is smaller than 100.

for expression results above 100 you should better use the subfield solution.....

hope this helps

pedromsouza
Creator
Creator
Author

I had not realized that. I'll use subfield instead. Thanks again.

Qliking since '09
MarcoWedel

Floor(expression,10)+10

might do as well