Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Not applicable

grouping values

Hi I got a field (A) with values going from 1 to 9 (maybe with new data will go over 10) and i need to group them into 3 categories of a new field (B):

If A=1 then B='1'

If A=2 then B='2'

If A>=3 then B='3+'

could you help me in writing the right script to build up the new field?

Thanks in advance

2 Replies
SunilChauhan
Esteemed Contributor

Re: grouping values

use below code

If (A=1, B='1',

If (A=2 , B='2',

If (A>=3 , B='3+')))

hope this helps

grouping values

Hi,

     Load

               A,

               If(A=1,'1',If(A=2,'2',if(A>=3,'3+'))) AS B

     From

               Table;

May be your need is this..

Celambarasan