Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I need help...
I tried to create a bar chart with 7 age groups, but the bar chart only show 3 age groups, what went wrong?
Users:
LOAD UserID,
Gender,
Age,
if(Age>0 and Age<=18,'Under 18',
if(Age>18 and Age<=24,'18-24',
if(Age>24 and Age<=34,'25-34',
if(Age>35 and Age<=44,'35-44',
if(Age>45 and Age<=49,'45-49',
if(Age>50 and Age<=55,'50-55','56+')))))) as [Age Group],
Occupation,
ZipCode
FROM
[$(vFilePath)\users.xlsx]
(ooxml, embedded labels, table is users);
Does your bar garph has age groups 35 to 55? Can you share this sample to look into?
Hi Wee,
may be
if(Age>0 and Age<=18,'Under 18',
if(Age>18 and Age<=24,'18-24',
if(Age>24 and Age<=34,'25-34',
if(Age>34 and Age<=44,'35-44',
if(Age>44 and Age<=49,'45-49',
if(Age>49 and Age<=55,'50-55','56+')))))) as [Age Group],
Regards,
Antonio
Please share some sample app with data
Hello everyone,
Thanks for your replies.
My freind has resolved the problem. Many thanks and appreciate all your valueable inputs.
Regards,
Wee
Hi
To recode like this, I think is easy to don't have gaps in between years:
LOAD
UserID,
Gender,
Age,
if(Age<=18,'Under 18',
if(Age<=24,'18-24',
if(Age<=34,'25-34',
if(Age<=44,'35-44',
if(Age<=49,'45-49',
if(Age<=55,'50-55','56+')))))) as [Age Group],
Occupation,
ZipCode
FROM
[$(vFilePath)\users.xlsx]
(ooxml, embedded labels, table is users);
And if you have gaps, maybe you don't have data for those intervals.
Regards