Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Darumaka
Contributor
Contributor

Conditionally show a chart on the same sheet

Hi!

I have nine charts on one sheet. Additionally I have nine other charts that I want to show on the same sheet. But I want to be able to toggle between these two "views". How do I achieve this?

I hoped to find the answer in the continuos classroom or a guide somewhere without success. Do you know if it is explained somewhere or can someone here help me?

Thanks in advance!

1 Solution

Accepted Solutions
MindaugasBacius
Partner - Specialist III
Partner - Specialist III

Create a new dimension like:

Switching:
LOAD * INLINE [
_Switching
First
Second
];

 

Then simply on each of the chart use Properties > Layout > Show regarding of your needs:

=Switching='First'

=Switching='Second'

Screenshot_1.jpg

 

Create new listbox with the Switching dimension.

 

For more control use Sheet properties. For example automatically selecting First when opening the sheet.

View solution in original post

4 Replies
MindaugasBacius
Partner - Specialist III
Partner - Specialist III

Create a new dimension like:

Switching:
LOAD * INLINE [
_Switching
First
Second
];

 

Then simply on each of the chart use Properties > Layout > Show regarding of your needs:

=Switching='First'

=Switching='Second'

Screenshot_1.jpg

 

Create new listbox with the Switching dimension.

 

For more control use Sheet properties. For example automatically selecting First when opening the sheet.

Darumaka
Contributor
Contributor
Author

Thank you! That seems to be working. I will just need to check out a few more things before accepting as a solution.

Just one tiny question, in the Load statement you write _switching with an underscore but then you reference it without underscore. I assume that it was just a mistake. But the question is if it is preferred that dimension variables start with an underscore, so that it is suggested in the naming what they are used for?

Brett_Bleess
Former Employee
Former Employee

I believe that was a typo! 🙂  You can name things pretty much anyway you see  fit but most folks do use a 'v' in the name of variables etc., they tend to follow general dev practices when doing development in QlikView too.  Here are a couple of links that may be of some help to you overall:

https://help.qlik.com/en-US/qlikview/April2020/Subsystems/Client/Content/QV_QlikView/LoadData/best-p...

https://help.qlik.com/en-US/qlikview/April2020/Subsystems/Client/Content/QV_QlikView/application-per...

Those may provide some tips to help longer term.  If you are all set, do not forget to return to close out the thread.

I did find a couple of Design Blog posts too:

https://community.qlik.com/t5/Qlik-Design-Blog/Enhancing-the-User-Experience-Using-Conditional-Expre...

https://community.qlik.com/t5/Qlik-Design-Blog/Enhancing-the-User-Experience-Using-Conditional-Expre...

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.
Darumaka
Contributor
Contributor
Author

Great, thank you so much, I will look into the links you posted.

I have one more question. You write that I can automatically selecting one of the views when opening the sheet in the sheet properties. How do I achieve this?