cancel
Showing results for 
Search instead for 
Did you mean: 

How to create Age range in compute field??

How to create Age range in compute field??

Hi,

I want to create a calculated field which can show the age group :

If Age<=19 THEN "14-19"
ELSEIF
Age>=20 and Age<=29
THEN "20-29"
ELSEIF
Age>=30 and Age<=39
THEN "30-39"
ELSEIF
Age>=40 and Age<=49
THEN "40-49"
ELSE
"50+"
END

can you please help me, how to write this in Paxata??

Regards,
Praveen

Labels (1)
1 Reply

Hello Praveen,

Could you please try the following compute statement to check if this works for you?

 if(@Age@<=19,"14-19", if(@Age@<=29,"20-29",if(@Age@ <=39,"30-39",if(@Age@<=49,"40-49","50+"))))

Image: https://us.v-cdn.net/6030933/uploads/editor/1l/gdrbd00rafs3.png
Thanks,
Akshay