Knowledge Drop

What is going on when I see "nesting of 101 is too deep"?

Last tested: Jan 14, 2020

When we are creating a custom filter with more than 50 boolean evaluations we will see the error nesting of 101 is too deep. For example, we will generate this error if we have a custom filter like this:

${} = 1 OR

${} = 2 OR

${} = 3 OR

${} = 50 OR

${} = 51


With more than 50 boolean evaluations, we get too deep. We have two options to resolve this:

Solution 1: LookML yesno field

We can create a dimension of type: yesno that will run this evaluation that we can then use as a frontend filter. This would look something like this:

dimension: one_to_fifty {

type: yesno

sql: ${id} = 1 OR

${id} = 2 OR

${id} = 3

${} = 50 OR

${} = 51;;



Solution 2: Use matches_filter( ) function

If we want to avoid making any LookML developments or need to be able to modify the filters from the front end we can compress all these individual boolean evaluations into a single evaluation using the matches_filter( ) function. The logic that would for this filter function would look like this:

matches_filter(${}, `1,2,3,... 50,51`)



Some extra context on this in this Community post 


This content is subject to limited support.                




0 replies

Be the first to reply!