Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

Define Range..? What all functions can be used?

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

1 Solution

Accepted Solutions
Not applicable

Define Range..? What all functions can be used?

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;

2 Replies
Not applicable

Define Range..? What all functions can be used?

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;

Not applicable

Define Range..? What all functions can be used?

Thank you so much Leonard.