Discussion Board for collaboration on QlikView Scripting.
i want to create a bar diagram.
This diagram should contain of multiple BARS. Each BAR representing a controlnumer.
Behind each controlnumber should be a function.
I can model it within the loading script, but when i click on a bar then i dont see the underliing filters in the selection overview.
I can make it work for 1 Bar per diagramm like the following.
I create a bar diagram and add a dynamic dimension for instance:
Now the problem is - i try to add other controlnumbers. The if / else does not work for that.
if(hair_color='blond' AND eyes='blue' ,'Controlnumber2'))
(base formula = count(distinct personids)
The problem about this is, that controlnumber 2 gets not shown because it is a subset of controlnumber 1. QlikView seems to only allow to display the bars if they are not overlapping.
But my controlnumbers DO overlap.
So how can i do this?
Please keep in mind, that i want to maintain the connection to other tables and that when i click on a bar, i still want to see the conditions / filters for this bar (which works for a single bar).
Can anyone help me out with this?
Go to Solution.
Basically, you create a table with a n:m relation between personids and control numbers, something like
'ControlNumber1' as ControlNumber
WHERE hair_color = 'blond';
'ControlNumber2' as ControlNumber
WHERE hair_color = 'blond' AND eyes='blue';
Maybe it's just enough to order your conditions subset first:
=if(hair_color='blond' AND eyes='blue' ,'Controlnumber2',
Or do you want to the records to be counted in the subset as well as in the superset?
Then you need to link the records to both sets in the script.
thanks a lot for the hint. Actually now after appliing your solution it still not works as i want it to work.
And yes, i think i want the records to be counted in the subset and the superset. Actually i would really prefer
if those BARS / SETS are completely independent from each other.
After appliing your solution i get:
5 blond blue
((In reality i should get 15 blond))
So basically - i think your second part should be my solution:
"Then you need to link the records to both sets in the script."
Unfortunately i do not know how to do this. Could you maybe give me a code snippet? Or explain a bit further - i am pretty much beginner level in QlikView.
maybe You can use ValueList() .
Thanks a lot! That made it work for me! Exactly how i want it!!!! Great help apreciate it!!!
Also thanks to Antonio - tried out the solution - could not make it work like i want to with the ValueList. Maybe there is a way to use it - but i could not figure it out.