Skip to main content
All CollectionsReports
Improve Report Performance with Data Set Filters
Improve Report Performance with Data Set Filters

Get faster report load times

Mike Maat avatar
Written by Mike Maat
Updated over 4 months ago

Sometimes, a Nektar report takes a long time to load. When reports are based on a Nektar data set (from the Data Set Manager), add filters to reduce report load times.

Option 1 - date filters

Data sets built in Data Set Manager have no filters by default. When a user runs a data set, the report returns all data for all time for all columns. In most cases, this is more data than the user needs unless the report is an all-time report. To reduce load time, use a date filter to reduce the amount of data that is returned.

Here's an example of a bad filter configuration. Let's say you need a report with data for the previous month. You could build a data set with no filters and then filter the data once it's in the report. Every time you run the report, you load ALL data for ALL time and then filter once the data pool is loaded into memory. This approach causes poor performance.

A better, faster approach is to add one or more filters to the data set. This way, the report only loads the required data.

Creating a date filter

To add a date filter, open a data set, click the three-dot icon, and select Filter. Next, click the first field on the left and select Recorded Date since our data set contains task data. Go to the next field and select the Since X days option. In the last field, enter a value of 30. This relative date comparison auto-adjusts itself to the last 30 days every time we run the data set and the associated report.

This filter configuration reduced the data set from 200,000 rows to 600 rows. Since this is all the data our specific report requires, load times dropped dramatically.

Option 2 - non-date filters

You can add non-date filters, too. In the screenshot below, we use a date filter (same as above) and then add a name filter. In this example, we keep all time cards from the previous 30 days and then go one step further by selecting records with the Foreman named John Smith.

Option 3 - advanced date filters

In Option 1, we limited the data return by specifying records for the previous 30 days. But what if we want the user to specify a date range that we could never know? The solution is to use a variable filter.

In our report, we have two variables called FromDate and ToDate. In its current form, the report loads ALL data (since the data set is unfiltered). Then, the report filters the data based on the user's inputs for the FromDate and ToDate variables. This configuration is sub-optimal because the report loads all the data on the first launch. After the user enters their variables, the report loads all the data again - doubling our wait time!

To solve this double-wait problem, we can use data set variable filters. Open the data set and add two filters. Again, using the RecordedDate column for this example, we set up the filters as below, but instead of choosing a relative date value or a specific date, we click the three-dot icon and choose Use a Variable. Then, we input our variable names from the report (see the above screenshot). This causes the data set to be filtered by the values the user enters into the report.

Now, when the user loads the report, the platform attempts to load the data source. The report loads a blank data set because the user has entered no values for the FromDate and ToDate variables. Therefore, the initial load of the report is very quick. After the user enters values for the FromDate and ToDate variables, the data set is once again queried—this time with filtered dates—and only returns the data necessary to satisfy the user's request. This configuration leads to a drastic increase in performance!


Related articles

Did this answer your question?