Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Nested set analysis syntax

What is the proper syntax for nested set analysis when i need to have multiple set analysis nested into each other using single quotes, double quotes, and which other quotes symbol?

Or is there a way to parse the quotes been nested?

For example,

=Only({<ItemNo = {'1'}>} Value)

this set analysis filters for item number = 1, and returns value.

=Only({<ItemNo = {"Only({<Type= {'1'}>} Number)"}>} Value)

this set analysis filters for item number and returns value, but the number is obtain using a nested set analysis to find a number.

The nested set analysis is surrounded by double quotes, while the field criteria inside is been surrounded with single quotes.

This syntax works.

BUT, what if i want to nest another layer of set analysis inside the already nested analysis,

what syntax do i use so that it is valid and does not break the code.

I cannot use single or double quotes since they are in used for a different scope already,

and trying to use two of the quotes '' or "" doesn't seem to work like it does for SQL syntax.

=Only({<ItemNo = {"Only({<Type= {'Only({<Thingy = {'1'}>} Type)'}>} Number)"}>} Value)

What is the proper way to do this ?

What should the encasing for the '1' be above ?

3 Replies
Anonymous
Not applicable
Author

Try to use 1 without any quotes...

Edit: Or maybe this:

=only({<ItemNo=P({<Type=P({<Thingy={'1'}>})>})>} Value)

Not applicable
Author

ooops, sorry for the confusion,

i'm actually trying to nest that into something else, thus the confusion.

Unless im wrong, double quotes innidicate the start of a function scope? as in it lets me call functions within the set analysis?

single quotes refers to text values ?

how do i nest another function inside the {'1'} without breaking my other quotes ?

edit:

I currently have a variable with a set analysis layered similar to the sample above.

The variable is been using in another expression set analysis.

Im trying to merge the functions from the variable into the function in the expression, without breaking the layered function scopes.

Anonymous
Not applicable
Author

I'm giving up guessing...  At least for now...

See if this helps: http://community.qlik.com/blogs/qlikviewdesignblog/2013/04/09/quoteology