Filter your data

In Reports V2, sprinkle offers functionality to filter the data in the report. Filters can be applied/changed in edit mode as well as view mode.

To create filters, you can follow the below steps:

  • Drag a field from the Columns section in the Input Pane to the Filter pane or select a column from the '+Add Filter' dropdown.

  • After selecting/dropping the column it will list two drop-down menus 'Λ…', one is below the column name which lists the appropriate operators and the other is next to the column name, which lists appropriate aggregations based on whether the column is of Text/Numeric type or Date functions if the column is of Date type.

  • You can select required aggregations/date functions from the drop-down or compare the column with values directly and the required operator from the next drop-down.

  • Then you can enter the values in the blue box below the two drop-downs based on the different column/aggregations selected: Date: On clicking the box it opens a date picker to select the dates. Also, if you have checked Include time option, the picker gives you option to select time as well. Numeric: Enter numeric values in the box. you can increase/decrease the values using the arrow icons towards the end of box. Text: On clicking inside the box, you can load cached values by clicking on the Refresh option or you can enter the values by typing and create them. After clicking on the Refresh button, this drop-down loads all the cached values.

  • After all the filter selections are complete, you can click the β˜‘ box to save the filter.

  • Click on the Save/Run button.

The FIlters section is available in both Edit/ View modes. In Edit mode, you may add, remove or update the filter operators and values. In the view mode, you may only update the filter operators and values for the particular run, it does not get saved.

Custom Filters

Custom filters are SQL expressions to create complex logic that evaluates to a boolean and you can use it to filter your data. For example, you need to filter data in your report by comparing values of two columns, you can not do that directly using normal filters. You can write an expression to compare the two columns and use it to filter the data.

You can create custom filters by following below steps:

  • Click on the Custom tab in the Input pane(Table).

  • Open the Custom Filters section and click on the '+Add Filter' button.

  • In the New Custom Filter pop-up, write the boolean expression for the filter, give it a name, and enter the description for the filter (optional).

  • You can use variables in your expression as well (optional).

  • Then click on the Validate button to validate the SQL expression.

  • Once validated you can create it by clicking on the Create button.

  • Then drag this Custom filter from the Table pane to Filters pane.

  • Click on the Save/Run button.

Note: You can add Custom Columns/Custom Metrics to the Filters pane and use it like the normal filters.

Last updated