Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
polisetti
Creator II
Creator II

To hide a chart when we select on a particular value in list box

Hi ,

I need to hide a chart ,When i select on a 'Domestic' value in list box and i need to show the chart when i select on 'International ' value in the list box.

Can you please tell me how to write the expression in layout of the chart.

Thanks

5 Replies
Not applicable

Hi,

You could use a conditional show on the Layout tab:

=if(GetSelectedCount(region)=1,if(region='International',1,0),1)

See attached qvw. for the example.

Cheers,

Paul

Colin-Albert

Use this expression for the conditional show to hide the chart when Domestic is selected and show the chart for other selections.

If(only(region)='Domestic', 0, 1)

its_anandrjs

Please clear requirement in details with a example and if understand clearly when if you select Domestic want to hide International and if select International hide Domestic if so then use below script.

For Domestic chart type this code in the Properties >> Layout >> Show conditional.

=if(GetSelectedCount(region)=0,1,GetFieldSelections(region)='Domestic')

For International chart type this code in the Properties >> Layout >> Show conditional.

=if(GetSelectedCount(region)=0,1,GetFieldSelections(region)='International')

Regards

Joseph_Musekura
Support
Support

Hi,

You could use two layers with below  conditions (see
attached *.qvw).

* if (getSelectedCount(region)=1, if (region='Domestic',
1,0), 1) in show conditional of chart 1

* if (getSelectedCount(region)=1, if (region='International',
1,0), 1) in chart 2

Thanks

maxgro
MVP
MVP

In Chart Properties --> Tab Layout --> Show --> Conditional


expression               region='International'

1.png