Limiting the data in a visualization using an expression

You can limit what data should be available for a certain visualization using an expression. This way, you can set a "hard filter" on a visualization to make sure that certain values are never included in the calculations behind the visualization, regardless of any filtering in the analysis.

Before you begin

Some of the functionality described here can only be authored or accessed using the installed Spotfire client.

About this task

For example, you can make sure that one visualization only shows data for a certain state by adding the expression similar to [State]="Florida". If you combine this expression limiting with the usual filtering from page, you will see data for Florida, but only for the rows currently filtered to. If you remove all filtering limiting, you will see the results for all data that matches the expression. For other examples of data limiting, see Adding data limitations for a visualization.

Procedure

  1. Click to select the visualization to limit.
  2. Open the visualization properties and locate the Data section.
  3. Under Data limiting, click Add limitation and choose Expression.
  4. In the opened dialog, enter an expression in the Expression field. In this example, we use [State]="Florida". You could also use this limitation together with a custom property and a property control in a text area to be able to switch state. See Limiting data using a property expression for more information.


    In the expression field, you can insert columns and functions, or enter text as in any standard text editor. In this context, the expression must represent some type of condition which can be either true or false (a boolean expression), because it will be used as a filter.

Results

The visualization is limited to only show data that fulfils the conditions of the expression.