Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
GaneshLakshman
Contributor III
Contributor III

Grouping values

Hi,

I have a column called points in which there are values from 1 through 10.

I have to group them like 1-5 as class A, 5-7 as class B, remaining as class C in another column called classlevel.

Is there a way to do it? Tried class function but didn't help.

 

Thanks

Ganesh 

3 Solutions

Accepted Solutions
dplr-rn
Partner - Master III
Partner - Master III

Why not if statements?
If(yourfield<=5,'Class A',if(yourfield<=7,'Class B', 'Class C') ) as ClassLevel

or is your logic more complicated than specified?

View solution in original post

GaneshLakshman
Contributor III
Contributor III
Author

This works.. But the table has close to 60 million records, Is there any way we can use if statements and still preserve optimised load? 

View solution in original post

dplr-rn
Partner - Master III
Partner - Master III

Unfortunatly cant think of any unless you can do the transformation in a resident load after loading the qvd.

View solution in original post

4 Replies
dplr-rn
Partner - Master III
Partner - Master III

Why not if statements?
If(yourfield<=5,'Class A',if(yourfield<=7,'Class B', 'Class C') ) as ClassLevel

or is your logic more complicated than specified?
GaneshLakshman
Contributor III
Contributor III
Author

This works.. But the table has close to 60 million records, Is there any way we can use if statements and still preserve optimised load? 

dplr-rn
Partner - Master III
Partner - Master III

Unfortunatly cant think of any unless you can do the transformation in a resident load after loading the qvd.
Channa
Specialist III
Specialist III

Grouping can use IntervalMactch for large data

Channa