☝️Small business or a startup? See if you qualify for our special offer.
+
All documentation
  • Introduction
  • Connecting to data source
  • Browser compatibility
  • Documentation for older versions
  • Filter by condition

    In Flexmonster, you can filter field members based on a certain condition. For example, you can create a filter to display dates of the previous quarter or countries that contain "Republic" in their name.

    Visit our Examples page for live examples that demonstrate how to filter in Flexmonster.

    About the filter

    The filter by condition exists for the following field types:

    • Number
      Note that in the flat form, the value filter is applied to number fields instead of the conditional filter.
    • String
    • Date
    • Time

    Each field type supports different filtering conditions. The filter’s availability for data sources also depends on the field type.

    Conditional filters for multilevel hierarchies

    When a conditional filter is applied to a multilevel hierarchy, the filtering affects all hierarchy levels and behaves according to the logic described below.

    If a parent hierarchy level matches the filter, Flexmonster displays:

    • The parent level.
    • All of the level’s children, regardless of whether the children themselves match the filter.

    If a parent hierarchy level does not match the filter, Flexmonster checks if any children match it. If so, the component shows:

    • The parent level.
    • Only the child levels that match the filter.

    If neither the parent nor any of its children match the filter, the entire hierarchy lever is hidden.

    Go to the JSFiddle example to see how it works.

    Availability for data sources

    Filter for number fieldsFilter for string fieldsFilter for date fieldsFilter for time fields
    JSON
    CSV
    Flexmonster Data Server
    MongoDB
    Microsoft Analysis Services
    Custom data source API***
    Elasticsearch

    * For the custom data source API, the filter by condition must be implemented on your server. For more details, refer to the Configuring filters guide.

    Available conditions

    The following filtering conditions are available for each data type:

    Number

    • Equal – Shows numbers equal to the specified number.
    • Not equal – Shows numbers not equal to the specified number.
    • Greater – Shows numbers greater than the specified number.
    • Greater or equal – Shows numbers greater than or equal to the specified number.
    • Less – Shows numbers less than the specified number.
    • Less or equal – Shows numbers less than or equal to the specified number.
    • Between – Shows numbers between the specified numbers (including them).
    • Not between – Shows numbers not between the specified numbers (excluding them).

    String

    Date

    Time

    Applying the filter

    The filter by condition can be applied via UI, in the report, or using API:

    Via UI

    Step 1. Open the filter view by clicking the field’s name or using the field’s context menu. You can resize the filter view using its window borders.

    Step 2. Depending on the field’s type, select an option to filter by:

    • Labels – for string and number fields.
    • Dates – for date fields.
    • Time – for time fields.

    This will open a subview where you can specify the filter by condition.

    Step 3. In the subview, choose a condition from the dropdown menu and enter a condition value in the input field. 

    The screenshot below shows an example of a filter configuration:

    Step 4. Once the filter is configured, click the APPLY button to save your configuration.

    In the report

    Using API

    Filter by condition can also be combined with the filter by selection. For more information, visit the Advanced tips guide.

    Clearing the filter

    Learn how to clear the filter by condition:

    Via UI

    Using the context menu

    Right-click a cell with the field’s member to open the context menu. Then, select the Clear filter option.

    Using the filter view

    Step 1. Open the filter view by clicking the field’s name or using the field’s context menu.

    Step 2. Select the Clear filter option located in the lower-right corner of the subview:

    Step 3. Click the APPLY button to save your changes.

    Using API

    See also