Skip to content

Data Filter

Screenshot
Data Filter showing a nested filter event

The Data Filter is a server-side filter tool to manage data in the Dashboards UI. The output is displayed in a component; e.g. Data Grid or Canvas Chart

Basics

Screenshot

Data Filter uses three elements:

Data Source

This is the data set on which filtering events will act. Data columns from this source will populate the Fields section and will be available for selection in the dropdown Filter.

Screenshot

Screenshot

Query Model

The query model is built by the filter UI (it does not need to be defined in advance); for example, the filter:

Screenshot

will be represented by the query model:


{"operator":"AND",
    "children":
        [
            {
                "propertyName": "sym",
                "propertyType":    11,
                "operator":     "equal",
                "value":        "EUR/USD",
                "active":       true
            },
            {
                "propertyName": "src",
                "propertyType": 11,
                "operator":     "not_equal",
                "value":        "BankOnline",
                "active":       true
            },
            { 
"propertyName": "bid", "propertyType": 9, "operator": "greater", "value": "1.3946", "active": true }, { "propertyName": "bsize", "propertyType": 6, "operator": "less_or_equal", "value": "1000000", "active": true } ] }

KDB String

This is the output of the filter and should be assigned to a View State Parameter. The string is then parsed out using a custom Data source in another dashboard component, e.g. a Data Grid.

Screenshot

Screenshot

The KDB String is parsed with the following filteredEvents query, as used in a Data Grid example:

Screenshot

    {[sym;startTime;endTime;filter] 
    res: dfxQuote;

    .dfilt.apply[res;filter]}

Screenshot

Fields

Screenshot

The default view is text input per Data source column. However, a dropdown selector can instead replace the text input. The Dropdown can be created using a Data Source or by adding a row.

Screenshot

Screenshot

Format, Margins

Style for common style settings

Build a filter

Screenshot Sample key of different Types supported by Data Filter

  1. Add a rule.

    Screenshot

    First dropdown is drawn from data source data options.

    Second dropdown is one of the operators: equal, not equal, in, not in, like, not like, is blank, is not blank.

  2. Add a second rule; here the AND statement requires the first and second rules to be true.

    Screenshot

  3. Add a new Group; show where subType is equal to rejected OR new.

    Screenshot

This gives a filter result in the Data Grid of:

Screenshot

Groups, Rules, and AND/OR statements can be freely mixed and built by the user in the Dashboard.

Filter group ordering can be changed with drag-and-drop.