Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello - I have two pie charts on one sheet, each use different set analyses to limit the scope of what is being shown. When a user clicks on a slice of either pie, the sheet filters based on the corresponding dimension, but does not filter based on the set analysis underlying the pie chart data. Is there a way to have the whole sheet filter on the selected dimension, plus consider the set analysis used to create the chart?
In case that doesn't make sense, here's an example...
One pie chart shows the count of cars by color, and another pie chart shows the count of trucks by color. The set analysis for the car chart is: =Count({<Vehicle_type={'Car'}>} Vehicle_ID), and for the truck chart it's =Count({<Vehicle_type={'Truck'}>} Vehicle_ID).
When I click on a slice of the pie chart for cars (let's say Red), it filters the rest of the sheet for Red vehicles, but not just red cars (as that's in the set analysis). Is there any way to have this happen?
The Easiest way to achieve your end behavior goal is to go back into the Script and Create purpose use dimensions for these charts.
Assuming the Chart dimensions are Vehicle_Color
Load Vehicle_Color as Vehicle_Color_Car, Vehicle_ID resident <Table> where Vehicle_type = 'Car';
Load Vehicle_Color as Vehicle_Color_Truck, Vehicle_ID resident <Table> where Vehicle_type = 'Truck';
Your expression for the Truck Chart becomes
Count({<Vehicle_Color_Car=>} Vehicle_ID)
Which ignores any selection based on the other charts dimension.
The Car one the same except Vehicle_Color_Car becomes Vehicle_Color_Truck
and eliminate the nulls using the appropriate option in the dimensions Tab on both charts
with the new dimension as Vehicle_Color_Truck and Vehicle_Color_Car respectively
Additional Dress up can be adding the changing the expressions to use both
Count({<Vehicle_Color_Car=,Vehicle_Color_Truck=>} Vehicle_ID)
and then adding a dimension to the Color tab of each expression to put the value of the color in place and half briting the other options
see this A Color Trick | Qlikview Cookbook
I think the same idea can be applied to create a offset on the pie for the selected slice as well.
The Easiest way to achieve your end behavior goal is to go back into the Script and Create purpose use dimensions for these charts.
Assuming the Chart dimensions are Vehicle_Color
Load Vehicle_Color as Vehicle_Color_Car, Vehicle_ID resident <Table> where Vehicle_type = 'Car';
Load Vehicle_Color as Vehicle_Color_Truck, Vehicle_ID resident <Table> where Vehicle_type = 'Truck';
Your expression for the Truck Chart becomes
Count({<Vehicle_Color_Car=>} Vehicle_ID)
Which ignores any selection based on the other charts dimension.
The Car one the same except Vehicle_Color_Car becomes Vehicle_Color_Truck
and eliminate the nulls using the appropriate option in the dimensions Tab on both charts
with the new dimension as Vehicle_Color_Truck and Vehicle_Color_Car respectively
Additional Dress up can be adding the changing the expressions to use both
Count({<Vehicle_Color_Car=,Vehicle_Color_Truck=>} Vehicle_ID)
and then adding a dimension to the Color tab of each expression to put the value of the color in place and half briting the other options
see this A Color Trick | Qlikview Cookbook
I think the same idea can be applied to create a offset on the pie for the selected slice as well.
Excellent solution, it's simple and works perfectly. Thank you Thomas!