Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I am creating a vertical bar chart where the age of a sample is the dimension. The expression is irrelevant for the question.
Taking age as a dimension, all ages are displayed seperately. Which is less informational for my situation than grouping them into age groups (eg. 10-20; 20-30; 30-40... etcetera)
I suppose I could achieve this by pre editing my load data, or by working with the load data during load..? But rather; I would like to do this when creating the chart, anyone know of a way? Maybe there is an option where I can manually group dimension values and rename them?
Curious of any thoughts on this or on best practices on my situation! Thx in advance (this is my first forum post)
Cheers
I'd do it during the load. But if you want to do it in a chart, I'd just use nested if() statements:
if(Age<=20,dual( '0-20',20)
,if(Age<=23,dual('21-23',23)
,if(Age<=29,dual('24-29',29)
...)))
The dual() function is there to make sure the data gets sorted properly, though in this case you should be fine without it. But it's often required, so I'll leave it in the example.
age is there in side the qlikview with the help of age() you find out the age and then you make
age bucket with the help of class function
Regards
Ashish Srivastava
Thx for quick respons! Got both age and class functions to work.
Though, I need to class non continously (forgot to mention that in my earlier post). Like this:
0-20
24-29
30-34
35-39
40-44
44-49
50-54
55-59
60-64
65-69
70+
This is now my class code:
=class(Leeftijd,10,Leeftijd,15)
Regards
I'd do it during the load. But if you want to do it in a chart, I'd just use nested if() statements:
if(Age<=20,dual( '0-20',20)
,if(Age<=23,dual('21-23',23)
,if(Age<=29,dual('24-29',29)
...)))
The dual() function is there to make sure the data gets sorted properly, though in this case you should be fine without it. But it's often required, so I'll leave it in the example.
Thanks. This solved my issues easily using the bar chart and the ability to enter the Dimension with an IF statement.