Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Everyone,
I have a spreadsheet where I have records of 1000 employees working in a company. Now I have to draw a chart where I have to define range, like i have to differentiate between data of 2009, 2010 and so on. It's a smple question but I am not able to figure out the expression.
So , each employee has a Age column linked with its record. How can we divide the Age based on range? example out of 1000 employees we can divide:
21-25-- 100
25-30-- 200
30-35-- 250
35 above ---500
So I have to design a Stacked bar chart , where Dimension would be Year. and then expression would be the count of employees based on range defined above, What calculated expression can I design? Please reply.
Thank you.
Best,
Yaman
Interval Match is what you are looking for here: Add (modify) the following to your load script after you have loaded the table with the employee data.
AgeRange:
LOAD * INLINE [
Start_Range, End_Range, AgeRange
0, 2, 0-2
3, 5, 3-5
6, 10, 6-10
11, 14, 11-14
15, 29, 15-29
30, 60, 30-60
61, 999, 60 >
];
Interval:
IntervalMatch([Age]) Load Start_Range, End_Range Resident AgeRange;
Interval Match is what you are looking for here: Add (modify) the following to your load script after you have loaded the table with the employee data.
AgeRange:
LOAD * INLINE [
Start_Range, End_Range, AgeRange
0, 2, 0-2
3, 5, 3-5
6, 10, 6-10
11, 14, 11-14
15, 29, 15-29
30, 60, 30-60
61, 999, 60 >
];
Interval:
IntervalMatch([Age]) Load Start_Range, End_Range Resident AgeRange;
Thank you so much Leonard.