Part 5 – Data Limiting With Expressions

Welcome to part 5 of my Spotfire Data Limiting Series. The first post in the series covered data limiting with the filter and data panels. The second post talked about data limiting in the web player. The third post discussed limiting using filtering schemes. Last week, I covered limiting with marking. Now, we are on to limiting with expressions. As a new Spotfire user, I was enamored with filtering schemes, but as my skills developed, limiting with marking became my go-to method.

I’ll begin this post with a brief explanation of data limiting with expressions. Then, I’ll show you how to set it up. Finally, I’ll explain when to use it and when not to use it.

What is Data Limiting with Expressions

Data limiting with expressions is a way to limit the data shown on individual visualizations with a boolean formula. The user writes an expression where the result is either true or false. Only data that is true is returned in the visualization.

The big benefit to using data limiting with expressions is that filtering and marking have NO IMPACT on the data limiting. Even if a user accidentally resets all filters, the visualization stays the same.

Setup

Limiting with expressions is configured in Visualization Properties > Data menu > Limiting with expression subsection, as shown below.

In this example, I want to return data where the StageAdditiveType equals “water” or “slickwater”. Note, limiting with expressions only works where the result is true or false.

With that said, you can use data limiting with case statements or if statements as shown in this example.

When To Use Limiting with Expressions

  • Use when you are worried about users resetting filters.
  • Limit with expressions when you don’t need details visualizations (data limiting with marking), but you still want to limit what is shown.
  • If you don’t want to mess with filtering schemes or find them cumbersome, as I do.
  • When the data to be limited doesn’t depend on the individual user.
  • If data limiting can easily be defined by a boolean statement.

When Not To Use Limiting with Expressions

  • If the data to be limited DOES depend on the individual user.
  • When limiting cannot be simplified to true or false. For this scenario, use limiting with rules, which is coming soon in the data limiting series.
  • When you have a lot of visualizations and/or the data limiting might change and the rework isn’t worth it. (I use the “isn’t worth it” qualifier because I still use this method even when there is uncertainty).

Recommendations for Use

  1. Document the use of data limiting so that users or other developers do not have to open up the properties dialog for every single visualization.
  2. Make sure limiting by expression is shown in the legend so users or other developers know that functionality is being used.

In summary, data limiting with expressions is one of my favorite methods, and I use it in almost every project I build.

Spotfire Version

Content created with Spotfire 10.2. (Yeah, upgrade!)