Optional filter selection in Direct Query filters
One of my dashboard filters is optional. When set, I'd like that in my SQL query to take effect, but when not set, I'd like the SQL query to ignore it.
-
Official comment
You can use something like this in the where clause
AND (delivery_region.name in ($c9_region$('')$[Region]${list|'|,}$) or $c9_region$('ALL')$[Region]${list|'|,}$ = 'ALL')
When Region is specified in the filters, Region is applied. Otherwise the condition is always true (skipping the and in effect).
Comment actions
Please sign in to leave a comment.
1 comment