Discussion board where members can get started with QlikView.
I have created a bar chart with 20 expressions and no dimensions. These expressions calculated the current age of people in a specified category's and the future when by using a slider. So you can see what the number of each category is about eg 10 years.
It works correctly.
Now I want to convert the bar chart into a line chart and but I dont receive the expected result. No line visible only numbers below each other.
Does anybody know if and how to solve this ?
Solved! Go to Solution.
Bar chart is for comparision and can be done by more than any no.of metrics with or without a dimension. Line chart is for trending which suggest how a metric(s) move over time (usuall time is the dimension but not necessarily). Hence the behaviour, in your case is expected. In line chart one expression will only have one line unlike bar graph. Propably if you want to share the intended interpertation of the graph alternatives can be suggested in this forum.
Below you find my current chart.
Below the situation when counting 10 years at the current age.
I am not satisfied about the layout. There is so much to see and I dont think it's really clear. So thats why I wanted to use a line chart.
Do you know if it is possible that starting at 0 only the current bars shown and adding years the new situation appears ?
Or when you have others ideas......
Yes, we can hide expressions based on a condition. If you are using QV 11 you can add a condition to expression and enable if its so.
In this case i think we can manage with one expression by adding a dimension (i guess each expression is same except for some minute difference). Create an inline load with values as in the slider and appropiate discription. Make expression such that the values computed based on the dimensional value and limit the number of visible rows to variable number.
Thanks Kiran and sorry for disturbing again.
I am using QV 10 since 6 weeks so not really experienced.
Can you give me more details how to solve ?
You are right the expressions are rather equal.
eg current 16-24
=sum(if(( age(MakeDate(Year(Now(1)), 12,31),Medewerker.DATEOFBIRTH)) <=24, Medewerker.Headcount))
=sum(if(( age(MakeDate(Year(Now(1)), 12,31),Medewerker.DATEOFBIRTH)+vAddToLeeftijd) <=24,
etc for the other catagorys
To use line chart you shoud convert your calculation model into something like this:
Try to create chart with
Dimension =class(age(MakeDate(Year(Now(1)), 12,31),Medewerker.GEBOORTEDATUM), 5)
But there is a problem. Your goal is to overlap actually two different dimensions (one with offset) of data Medewerker.Headcount.
To merge that dimensions dynamicly let field "Expression":
LOAD * INLINE [
Change the dimension formula:
=class(age(MakeDate(Year(Now(1)), 12,31),Medewerker.GEBOORTEDATUM) + if(Expression='Future', vAddToLeeftijd, 0), 5, 'x', 0)
Add the field "Expression" as dimension (lower than previous one).
That's all. You have one data set Medewerker.Headcount over two dynamic dimensions.
To make it better you can use different line colors according to "Expression" field value.
If the offset of movement always equals to the dimension step (5 years in my example) you can just add expression for "Future"