Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
In my script I load a table that is BirthYearMonth (ex 198201)
In a chart I wish to group the people by age-intervall, 0-12, 13-21 and 22->
In a other table I would like to use a diffrent age-intervall, 16-24, 25-> Is that possible and how to do it?
What would be the best way to do this? I would also like it to change when we get a new year and relode the script...
thanks!
Hi
I think the best way is to create a new field in the script with a calculation of the age like this :
age( today() , makedate(left(Birthday,4) , right(Birthday,2) ,1)) as NbYear
age return the number of year between the 2 dates.
Then in the chart add a new dimension :
if( NbYear <= 12 , '0-12' , if( NbYear < =21 , '13-21' , etc...)))
hope that help
JJ
Hi
I think the best way is to create a new field in the script with a calculation of the age like this :
age( today() , makedate(left(Birthday,4) , right(Birthday,2) ,1)) as NbYear
age return the number of year between the 2 dates.
Then in the chart add a new dimension :
if( NbYear <= 12 , '0-12' , if( NbYear < =21 , '13-21' , etc...)))
hope that help
JJ