Filter with presentation variables

You can use presentation variables as filters in a report. This topic provides an example of creating a filter that uses an As_Of_Date presentation variable.

For information on how to create presentation variables, see the step-by-step instructions in Use presentation variables.

Presentation variable filter example

One example of using a presentation variable as a filter might be in an ICRW report that displays our month-by-month spending on computer equipment. When you run the report, you are prompted to select an As of Date so you only see the invoices that are due on or before the selected date.

That selected date is stored in a presentation variable that was defined using a variable prompt, as described in Use presentation variables. You can then reference that presentation variable in a report filter.

In the following example, the name of the presentation variable is As_Of_Date. The report filter you create returns invoices that are due on or before that date.

  1. Open an ICRW report to Edit and go to the Define tab.
  2. Go the Filters section at the bottom of the page, select the Filter icon, and choose a column name from the dropdown list.
  3. In the New Filter dialog, choose an Operator for the filter from the dropdown list.
    This example uses the less than or equal to operator.
  4. Expand More options and choose Presentation Variable from the dropdown list.
  5. Enter the presentation variable name in the Variable Expr in the text field. In this example the variable name is As_Of_Date.

    The Due date [Invoice] filter uses is equal to / is in operator. Presentation Variable is selected and As_Of_Date is the Variable Expression.

  6. Select OK.

The presentation variable filter appears in the Filters pane in the bottom of the window.

Filter syantax shown in the Filters panel: Due date [Invoice] is equal to / is in @{As_Of_Date}