Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a field for Date of Birth. I want to calculate their age and show a chart which displays the number of members in each age group.
Age groups would be like 30-39, 40-49, etc.
I can calculate the age. But no idea how to group them and build the chart.
Ok, you are using an SQL function, here. We were talking about the QV function.
You can use the QV functions in a preceding load:
LOAD *,
class(Age_Int, 5) as Age_Class;
LOAD *,
age(today(1),birth_date) as Age_Int;
Select
member_id,
first_name,
last_name,
member_type,
city,
zipcode,
phone,
email,
birth_date,
age (birth_date) AS Age_Bracket,
gender,
sign_up_date,
county,
firm_id,
state
from members
Where Not (Member_type = 'M');
Thank you. That worked.
Sorry for all the questions.
1. How do I sort the axis so that I have 10-20 then 20-30 then 40-50, etc.
2. How can I change the values on the axis to look like the above?