Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted
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
Highlighted
Master II
Master II

perhaps like this:

right(class(expression,10),2)


or better:


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

View solution in original post

Highlighted
Creator
Creator

Thanks Frank. It worked with "right".

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

Qliking since '09
Highlighted
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

Highlighted
Creator
Creator

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

Qliking since '09
Highlighted

Floor(expression,10)+10

might do as well