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

How to diplay age limit

Hi all.

LOAD * INLINE [

    name, age

    kul, 18

    sek, 20

    ram, 25

    raju, 30

    pandu, 45

    mena, 50

    manju, 61

    nag, 78

    chiru, 82

    bala, 96

   

];

   diplay data in age wise ex:0 to 20,21 to 40,41 to 60,61 to 80, 81 to 100 like that

diplay data in list box

thanks

sekhar.

1 Solution

Accepted Solutions
PrashantSangle

Hi,

Create Bucket in script.

For that you can use Class()

or

if(Age>0 and Age<21,'0 to 20',if(Age>20 and Age<41,'21 to 40',if(Age>40 and Age<61,'41 to 60'))) as Age_Bucket.

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂

View solution in original post

9 Replies
Chanty4u
MVP
MVP

hi shekar

can u elaborate the requirement

wat do u want exactly..?

Thank you

Suresh

Not applicable

Hi Sekhar,

You can use class function ,

Load Class(age,20) As AgeLimt, Count(name) as Cnt Group By Class(age,20);

LOAD * INLINE [

    name, age

    kul, 18

    sek, 20

    ram, 25

    raju, 30

    pandu, 45

    mena, 50

    manju, 61

    nag, 78

    chiru, 82

    bala, 96

  

];

Faisal

PrashantSangle

Hi,

Create Bucket in script.

For that you can use Class()

or

if(Age>0 and Age<21,'0 to 20',if(Age>20 and Age<41,'21 to 40',if(Age>40 and Age<61,'41 to 60'))) as Age_Bucket.

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Not applicable

Hi,

You can try:

Tab:

Load name,Class(age,20) As AgeLimt,age ;

LOAD * INLINE [

    name, age

    kul, 18

    sek, 20

    ram, 25

    raju, 30

    pandu, 45

    mena, 50

    manju, 61

    nag, 78

    chiru, 82

    bala, 96

  

];

avinashelite

Hi Sekhar,

try like this

LOAD * INLINE [

    name, age

    kul, 18

    sek, 20

    ram, 25

    raju, 30

    pandu, 45

    mena, 50

    manju, 61

    nag, 78

    chiru, 82

    bala, 96

  

];

Interval_Table:

   

    LOAD * Inline

    [

    Low,High,Group

0,10,0-10 Score

10.01,20,10-20 Score

20.01,50,20 - 50 Score

50.01,70,50 - 70 Score

70.01,100,70 - 100 Score

];

Result:

IntervalMatch (age)

LOAD Low  , High

Resident

Interval_Table;

SatyaPaleti
Creator III
Creator III

Hi Shekar,

Try this

AgeLimit:

LOAD * INLINE [

    name, age

    kul, 18

    sek, 20

    ram, 25

    raju, 30

    pandu, 45

    mena, 50

    manju, 61

    nag, 78

    chiru, 82

    bala, 96 

 

];

Age:

NoConcatenate LOAD name,

age,

if(IsNull(age) or age = '', Dual('No Age',1),

     If(age <= 20, Dual('Age under 20',2),

     if(age >= 21 and age <= 40, Dual('Age under 20 to 40',3),

     if(age >= 41 and age <= 60, Dual('Age under 40 to 60',4),

     if(age >= 61 and age <= 80, Dual('Age under 60 to 80',5),

     if(age >= 81 and age <= 100, Dual('Age under 80 to 100',6)

    )))))) as AgeNew

Resident AgeLimit;

DROP Table AgeLimit;

You will get output like this

age1.JPG

Thank you,

Satya Paleti

Anonymous
Not applicable

Hi ,

Try like this in list box expression

=Class(age,10,'age',10+1)

SatyaPaleti
Creator III
Creator III

Shekar you can also try like this

AgeLimit:

LOAD * INLINE [

    name, age

    kul, 18

    sek, 20

    ram, 25

    raju, 30

    pandu, 45

    mena, 50

    manju, 61

    nag, 78

    chiru, 82

    bala, 96 

 

];

Age:

NoConcatenate LOAD name,

age,

Replace(Class(age,20),'<= x <','to') as AgeNow

Resident AgeLimit;

DROP Table AgeLimit;

Than you,

SatyaPaleti

Not applicable

Hi Kula,

Try Like this:

Ex:    

if( (age) = 0, '0',

    if( (age) >=1 and (age) <=10 , '1-10',

    if( (age) >=11 and (age) <=25, '11-25',

    if( (age) >=11 and (age) <=25, '11-25',

    if( (age) >=25 and (age) <=50, '26-50',

    if( (age) >=51 and (age) <=75, '51-75',

      age ))))))

Ramya.