TIBCO Cloud™ Spotfire® User Guide

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.
    Tip: To edit an existing expression, click the pencil icon next to the expression and make your changes in the dialog.
    Tip: When using the installed client to specify the expression, you might find the Resulting expression field useful, if preprocessor functions (such as ${PropertyName}) are used in the expression. It shows the expression after all occurrences of the property have been replaced with its current value or values. Read more in Using document, data table or column properties in an analysis.

Results

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


Tip: To remove an added limiting expression from a visualization, in the visualization properties Data limiting section, click on the next to the expression in the list.