Skip to main content
Version: 1.28 (Current)

Filters New in 2

Audience: Low-code Engineers

Skill Prerequisites: Dashboard, Tokens, Forms 2.0

A dashboard can be filtered in two ways:

  • In each widget: its own time range and WHERE clause decide which records it counts, e.g. "Orders in Q1 2026". See Filter a widget.
  • For the whole dashboard: viewers pick a region or a period in a form above the dashboard, and every widget follows. See Dashboard filters.

Filter a widget​

A widget's own time range​

Widgets of entities and database tables have a Time Range on their Data tab, based on one of their date properties or columns:

The Time Range list of a chart: All Time, Today, Last 24 Hours, Last 7 Days, Last 30 Days, This Week, Last Week, This Month, Last Month, This Year, Last Year, Custom and Filter: Order date

  • All Time, Today, Last 24 Hours, Last 7 Days, Last 30 Days, This Week, Last Week, This Month, Last Month, This Year and Last Year move with the calendar: "This Year" always means the current year. Weeks start on Monday.
  • Custom fixes the days, for a widget that always shows the same period, such as a quarter or a campaign.
  • Filter: <label> follows one of the dashboard's date-range filters.

To show a fixed period:

  1. Click the widget and open its Data tab.

  2. Set Time Range to Custom, and Based On to the date to filter by, e.g. OrderDate.

  3. Fill in From and To. Both days are included. Leave one empty to leave that side open, e.g. only a From for "since 1 January".

    The Data tab of a KPI tile: Time Range Custom based on OrderDate, From 01/01/2026, To 31/03/2026, Both days included

  4. Click SAVE.

A KPI tile shows its range under its number, and a chart reads only that period:

A KPI tile, Orders in Q1 2026, 51, 2026-01-01 – 2026-03-31

A bar chart of revenue per region in Q1 2026

The range also applies to the widget's drill-down, and to a KPI tile's [Kpi:From] and [Kpi:To] tokens.

A widget's WHERE clause​

Widgets of entities and tables also have a Where on their Data tab: a SQL condition the records must meet, e.g. Status = 'Open' or Region = 'North'. A SQL Query widget filters in its own query.

Both can use tokens, so a widget can filter by the viewer or by the page:

FilterExample
The viewer's own recordsOwnerId = [User:UserID]
A value in the page's addressRegion = '[QueryString:region]': on /Sales?region=North, North's records
A dashboard filter('[Filter:Region]' = '' OR Region = '[Filter:Region]')

Token values are escaped for SQL.

Dashboard filters​

Dashboard filters let viewers filter every widget at once. You define them in the builder; SAVE adds a form for them above the dashboard:

A dashboard with its filter form at the top: Region, At least orders, Order date set to This Year, Orders until, and Apply

Define the filters​

  1. In the Dashboard Builder, open the Settings tab and find Filters.

  2. Click + Add filter, and fill in:

    • Name, used in tokens: letters, digits and _, starting with a letter, e.g. Region.
    • Type: Text, Number, Date or Date range.
    • Label, shown on the form, e.g. Order date. Empty, the form shows the name.
    • Default, used until the viewer picks a value. A date range's default is one of the Time Range presets, e.g. This Year.

    Under each filter, the builder lists the tokens it gives.

    The Filters section on the builder's Settings tab: Region (Text), MinOrders (Number, label At least orders), Period (Date range, label Order date, default This Year) and AsOf (Date, label Orders until), each with its tokens

  3. Click SAVE.

The first SAVE with filters adds a Forms 2.0 form named after the dashboard, e.g. "Sales Dashboard Filters", right above it. It has a field per filter and an Apply button. A date range is a list of the presets and Custom, which shows From and To dates.

The form is a form like any other: change its layout, labels or styling in the Form Builder. Later SAVEs add the fields of new filters to it, and leave your changes alone.

Make the widgets read the filters​

A widget reads a filter through its tokens:

TokenValue
[Filter:Region]The filter's value: text, a number, or a date as yyyy-MM-dd. For a date range, the preset, e.g. Last30Days, or Custom.
[Filter:Period:From]A date range's first day.
[Filter:Period:To]The day after a date range's last day.
[Filter:Period:Text]The range as viewers read it, e.g. "Last 30 Days" or "2026-03-01 – 2026-05-31".

Use them wherever a widget takes tokens: its SQL query, its WHERE clause, a Token or Constant value, its title, description, Show Condition, threshold steps and labels, and Root CSS Classes. Its On click actions get them as context variables, e.g. [Filter:Region]. The dashboard's own Show Condition and Root CSS Classes can use them too. A token's default applies when the filter is empty, e.g. a title Revenue in [Filter:Region=all regions].

For example, a SQL chart of orders per month that follows the Region and Period filters:

SELECT DATEFROMPARTS(YEAR(OrderDate), MONTH(OrderDate), 1) AS [Month], Region, COUNT(*) AS Orders
FROM dbo.Orders
WHERE ('[Filter:Region]' = '' OR Region = '[Filter:Region]')
AND ('[Filter:Period:From]' = '' OR OrderDate >= '[Filter:Period:From]')
AND ('[Filter:Period:To]' = '' OR OrderDate < '[Filter:Period:To]')
GROUP BY DATEFROMPARTS(YEAR(OrderDate), MONTH(OrderDate), 1), Region
ORDER BY 1

Follow a filter in a widget's time range​

A widget of entities or a table doesn't need tokens for a date range: its Time Range lists Filter: <label> for each date-range filter, e.g. Filter: Order date. Choose it, and the widget reads the viewer's range on its Based On date. A KPI tile then shows the filter's text under its number, e.g. "Last 30 Days".

What viewers see​

  • A viewer picks values and clicks Apply. Every widget loads again with the new values, without reloading the page.
  • The values go into the page's address, e.g. ?filter-Region=South&filter-Period=Last30Days, so a link or a bookmark opens the dashboard filtered the same way, and the browser's Back button returns to the previous values.
  • An empty field clears its filter, so the widgets show every region again.
  • Clicking a point or a tile opens its drill-down filtered the same way, so the list shows the records the widget counted.
  • Clicking a chart's point doesn't filter the dashboard's other widgets. Only the filter form, or a Filter Dashboard action, does that.
caution

Filters aren't permissions. Their values come from the page's address, so a viewer can type any value there. To limit what a viewer may see, use tokens of the viewer, such as [User:UserID], or an entity's view permissions.

The Filter Dashboard action​

Apply runs a new action, Filter Dashboard, under UI Actions. You can use it in any form or listing button too, for example a "Show North" button:

  • Dashboard: the dashboard to filter; empty, the dashboards on this page. For a dashboard on another page, the action opens that page with the filters.
  • Filters: the names and values to set, with tokens, e.g. Region = North.
  • Replace Filters: clears the other filters, so their defaults apply.