Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
dadumas
Creator II
Creator II

Using get() functions in set analysis not working in conditional display

I want to display sheets based on a conditional expression tied to the data model.

If I use the below in a textbox to test the calculation, it works fine (displays the correct "Count").  I have tried with double quotes and single quotes. It behaves the same.

=sum({$<SheetName={"$(=GetActiveSheetId())"}>} Count)>0

However, when I use it in a conditional expression, in the sheet properties, it does not work (sheet does not display when it should).  In my opinion, the textbox and the conditional expression should both "work" the same.  They do not.  If I hard code the sheetid, the conditional expression works fine and the sheet displays.  The GetActiveSheetId() returns Document\Media, which is what I have stored in the data model.  Again, when that is hard coded, the sheet displays fine.  I also have a textbox which displays GetActiveSheetId()

Has anyone seen this before?

Dave

11 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

I would not agree this is a bug. GetActiveSheetId() returns the id of the currently active sheet. When you are on the Media sheet, it returns "Document\Media".  When you are on the Audio sheet, GetActiveSheetId() returns "Document\Audio".  That results in "false" on the Media sheet because you don't have "Document\Audio" in your SheetName field.

What you may be looking for is something like "GetThisSheetId()" -- which doesn't exist.

In the past I've arrived at the same solution that Peter suggested.

-Rob

http://masterssummit.com

http://qlikviewcookbook.com

dadumas
Creator II
Creator II
Author

Rob,

Just hard coding the sheet name works fine.  There is really no need to call a function here - I know when sheet I am on when I am on that sheet

I was over thinking this.

Thanks,

Dave