Skip to content

Control What You See on a Tile

Overview

More often than not, we want to limit the how much data is displayed on a visual - regardless of the user selected filters on the report.

For example, we would want a tile to only show:

  • For each customer, show me the order total in the current fin. year.
  • Show me the net sales in the last 3 months.

We want to restrict the insight / content displayed on a tile based on the usecase. In this section, let's look at how to add these filters.

Adding Filters to restrict data

Let's assume we have a visual displaying sales by state, and we want to only show the sales for the country USA and Australia since 1 January 2005.

BEFORE: Sales for all states of all countries. alt text



STEP 1:
Find the country attribute in the attribute pane and click on the filter icon next to it. alt text

STEP 2:
PersivX will display the different filter types for the attribute depending on the data in column. Select the desired filter type.
In out case, we want to select the "is one of" filter type - which, if you are a developer, is the "IN" clause in SQL. alt text

STEP 3:
Provide the filter values.
In out case, we want to only display the data belonging to the countries USA and/or Australia. Hence in the filter value we mention - USA,Australia. Once added, do not forget to update the chart. alt text

Next, lets only the fetch the data since 1 January 2005.

STEP 4
Repeat steps 2 and 3 to add filter on the orderDate field from the orders table. Select the filter type "greater than or qual to", and we will use the filter value '01-01-2005'. alt text

Note

You can add filters on as many column as you wish. You can also add multiple filters on the same columns. For example, if we want to only display the sales from 1 January 2005 to 1 April 2005, add another filter condition on the orderDate column using the + icon. alt text

Important points to remember

  1. Not seeing the expected filter type in the list? Ensure that the auto-detected column type is correct. If not, you can direct PersivX to assume the column type to the one you expect.

    STEP 1: Click on the data type next to the column name

Notice how the PersivX is showing filter options as if the orderDate column was of type alphanumeric, and not date. This could be because of incorrect DB setup / incorrect inference of the column because of the way the values are stored for the column. Either way, this can be handled gracefully in PersivX.

alt text STEP 2: Override the column type to the one you expect and click save
alt text STEP 3: Click on the filter icon twice, once to remove the existing - and finally to add again based on the column type
alt text

Now that the column type has been overridden, PersivX displays correct filter options to work with.

Warning

If the tile fails to load after updating the column type, make sure the data stored in the column can be inferred as the overridden column type.

For example, if the orderDate contains values such as "PersivX" and you override the orderDate column type to "Date", chart will fail to load as "PersivX" is not of type "Date" - but you are forcing it to be displayed / filtered on as date.