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

Hide chart/table if condition is satisfied

Hi,

Consider a case where I have a chart and list box.

If I select anything in list box, chart should be hidden.

Otherwise chart should be displayed.

How to do this?

Thanks

Happy Thoughts

7 Replies
brenner_martina
Partner - Specialist II
Partner - Specialist II

Hi, Ravi,

in layout you can enter a if-then-else condition using p.e. the function:

=If(GetSelectedCount(Fieldname_of_the_Listbox)<>0,1,0)

Not applicable
Author

Hi Martina,

Thanks for quick reply.

I want to apply criteria in Layout-Show-Conditional-

I didn't get "....enter a if-then-else condition using p.e. the function.."

Can you explain?

If I want to apply condition in Layout-Show-Conditional-, how should I do it?

Thanks.

Happy Thughts

Not applicable
Author

clikc right mouse key on your chart, select "Properties".

Choose the second tab of the right "Layout".

On th eright side you will see "Show"

Below "Show" the "Always" is selected. Below that there is "Conditional". Check Conditional and enter the condition in the text field right of "Conditional".

If the Condition is true, the Char is seen on the screen.

Regards

Michael

montubhardwaj
Specialist
Specialist

Hi Ravi,

There is a simple way to do this:

in the condition box, type the expression as below:

=if(GetSelectedCount(List_box_field)=0)

The graph will show only if there is nothing selected from List Box.

Hope this was helpful.

Regards,

Sharma

Not applicable
Author

Hi,

Thanks for your responses.

Plz refer to the attachment where I have applied your suggestions.

Yet its not working.

What I want is, if I select nothing in List Box - "Year", Revenue table should be displayed.

If I select something in "Year", chart should vanish.

Hoping for your favourable responses soon.

Happy Thoughts

montubhardwaj
Specialist
Specialist

Hi Ravi,

I have changed the condition a bit and now it will show only ig there is nothing selected in the Year list box.

Let me know if it worked.

Thanks,

Sharma

Not applicable
Author

Hi,

Thanks a lot, it worked perfectly.

Keep sharing.

Happy Thoughts