Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Filtering by Chart Selection with Set Analysis

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?

1 Solution

Accepted Solutions
tmackay2015
Partner - Contributor III
Partner - Contributor III

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.

View solution in original post

2 Replies
tmackay2015
Partner - Contributor III
Partner - Contributor III

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.

Anonymous
Not applicable
Author

Excellent solution, it's simple and works perfectly. Thank you Thomas!