Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
New to Qlikview
So I have a huge set of data with information on different people. Ages range from 17 to 93. Is there a way I can simply group these ages into bands of 5. So instead of having age as 17,18,19...,93 it would be 17-21, 22-26,....
(A bit of context, I want to group these ages and work out the average Insurance premium charged in each age group. So instead of having an average for each age seperately it would have an average for each age group.)
Cheers
(Sorry if posted in wrong forum)
Kristian,
a couple of ways to achieve this spring to mind.
Either, set up a table with the ranges and use an IntervalMatch in your load
Or if your groups are the same length (e.g. all are 5 years), you can use a Class in your charts.
Marcus
Kristian,
a couple of ways to achieve this spring to mind.
Either, set up a table with the ranges and use an IntervalMatch in your load
Or if your groups are the same length (e.g. all are 5 years), you can use a Class in your charts.
Marcus
Hi,
You can use class function for this
Thanks
HI,
Have a look at the example posted on this post.
Class function | Qlik Community
Regards,
Kaushik Solanki
I think this link will help you.
http://community.qlik.com/blogs/qlikviewdesignblog/2014/07/18/dual-exists-useful-functions
Cheers for the help guys. Class worked just fine.
Much appreciated.
Im now on something new and require grouping in different sizes. So now a list called 'Clicks' which is 0,1,2,3,4...15 I now need as 0,1,2,3-5,6-10,11+
I know you mentioned IntervalMatch but I literally have no idea how to use that.
Thanks again
Hi Kristian,
Marco's link above gives an example of IntervalMatch which may be useful.
Otherwise you could do something like this:
Data:
LOAD MatchedValue
etc, etc;
Intervals
LOAD * INLINE [
RangeName, RangeMin, RangeMax
0, 0, 0
1, 1, 1
2, 2, 2
3 - 5, 3, 5
etc, etc...
];
LEFT JOIN (Data)
IntervalMatch (MatchedValue)
LOAD RangeMin, RangeMax
RESIDENT Intervals;
LEFT JOIN (Data)
LOAD
RangeMin, RangeMax, RangeName
RESIDENT Intervals;
DROP TABLE Intervals;
Sorry for this, like I said I'm completely new to qlikview, but what should I put in the first 'etc. etc.'?