Use a Parameter in an Expression Filter

You can include a parameter in an expression filter's SQL expression to create a complex visualization filter.

This tutorial provides a use case explaining how to use a parameter in an expression filter:

Tutorial icon Tutorial

  1. On the Home page, hover over a workbook, click Actions (Actions menu ellipsis icon), then select Open.
  2. Click the visualization that you want to add the expression filter to and confirm that the visualization's Grammar panel is displayed.
  3. In the Grammar panel, scroll to the Filters area, click Drop Target Options, and select Create Expression Filter.
  4. In Label, enter a name for the expression filter.
  5. In the Expression field, use this syntax to build the expression:
    @parameter("parameter name")('default value')
    For example:
    rank(Sales)<=@parameter("Top N")(10)
  6. Click Validate, and then click Apply to save the expression filter.