Knowledge Base Article

Filter Out Selected Filter Values

Occasionally, we would want to have a chart show everything except the values selected in a filter. For this use case, we recommend using the following SQL in your chart query. 
where
  case
    when '[Filter_name|Default]'= 'Default'
      then 1 = 1
    else not [Column_name=Filter_name]
  end
For the above example: 
  1. If no filter values are selected, then all results are shown
  2. If one or more filter values are selected, then we show everything but those values
Enjoy 🙂
Updated 03-02-2023
No CommentsBe the first to comment