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: 
Not applicable

How to use GetActiveSheetID() to hide a conditional chart

Hi - first time poster here and still pretty new to the wonderful world of QV

I have a chart which I'm using as a "drill" so it only appears when the user makes a certain selection.  The expression is:

len(getFieldSelections(Question)) > 0

However, this makes the chart visible across all 4 sheets in my QVW.  I only want it to appear on the "home" sheet.

I thought adding the condition GetActiveSheetID() = 'SH04' to the above would do the trick but it didn't work.    The sheet is always hidden in that case even though I verified that the sheet ID is SH04 (at least that is what the properties tells me it is)

Am I barking up the wrong tree?  Is there a way to find out the value of GetActiveSheetID() is at any given time?  Is there a better way to do this?

Thanks in advance!

3 Replies
MayilVahanan

Hi

=GetActiveSheetId() gives Document/SH04

So i think you want to use like this

=GetActiveSheetId() = 'Document\SH02' and GetSelectedCount(Question) > 0


this makes the chart visible across all 4 sheets in my QVW.  I only want it to appear on the "home" sheet.

Can you explain in detail. Its make little bit confusion.

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Not applicable
Author

Thanks for the reply.  I think I have some other issue that is causing this problem.

So, I'll try to explain.  There are 4 tabs (sheets) in this document.  The conditional charts are only supposed to show up on Sheet 4.  Instead, they show up on tab 2, 3 and 4 when the condition is met.  this still happens even when I add the

getactivesheetid() =  'Document\SH04'

I copied Sheet 2 to make Sheet 3 & 4.  Note that the box doesn't show up on Sheet 1.  So, I feel like there is some condition that I created when copying the sheets that is causing or contributing to the issue.  Thanks for your help.

MayilVahanan

HI

PFA

Hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.