Setting a time range in Activeboards
You can use the general time-range control in the Activeboards work area to enable real-time by clicking the play button, or to apply a time range to all the widgets in your Activeboard. Alternatively, you can assign a specific time range to an individual widget by clicking on its top bar and setting the time range in the pane to the right. You can set an absolute time range or use date language expressions in your entire Activeboard or selected widgets.
Learn the basics of setting an absolute time range in your Activeboard or specific widget in the following video:
Set a time range for your Activeboard
When you set a specific time range for an Activeboard, the widgets' data is automatically recalculated and only the results for the selected time range are displayed.
Simply click the time-range area in the top-right corner to define a new period in the window that appears, then click Apply to recalculate the Activeboard's data.
Set a time range for a widget
You can also set specific time ranges for individual widgets by clicking the widgets' top bar and enabling the Custom Date Range option. This will open a time-range picker that works exactly the same as the Activeboard general one. Remember that setting a custom time range for a widget overrides the period selected for the Activeboard.
Keep in mind that selecting the ISO week option for a snap to time range means that your week begins on Monday. By default, the week in Devo always begins on Sunday. If you use the platform in Spanish then your week begins on Monday by default.
Time range options
There are three different options available when you set a time range for an Activeboard or widget:
Set an absolute date
Click the time range indicator and from the calendar select the start and end date of your required range, then click Apply. The Activeboard or widget will be updated to display data from that period of time, and the selected range will be shown in the time range indicator.
Date language expression: relative
You may want to represent data from periods of time relative to the current date (for example, last 5 minutes, last day, etc.). To do this, click the time range indicator and select one of the options in the Preset intervals area on the right, then click Apply.
The interval selected will be shown in the time-range indicator. You will notice this icon, which indicates that a preset interval has been applied to the Activeboard or widget.
When you select a relative date, you can click the play button to activate real-time data flow in your Activeboard or widget. After activating the real-time option, this iconappears on the corresponding widgets. Keep in mind that widgets with a custom date range set will not be affected when you enable this option in the Activeboard time range selector.
When the real-time option is enabled, widgets are refreshed at the query grouping time (for grouping time > 0 and <= 5 minutes) to show the new data corresponding to the relative period specified. Widgets with queries that group data every 0 (no-temporal grouping), or queries that don't group data or grouping time is greater than 5 minutes, are refreshed every 15 seconds.
For example, if you select Last 5 minutes in a widget custom time range and the widget query groups data every 5m, the widget will be refreshed every 5 minutes to show data corresponding to the last 5 minutes. If you select Last 5 minutes in a widget custom time range and the widget query groups data every 10m, the widget will be refreshed every 15 seconds to show data corresponding to the last 5 minutes.
Date language expression: snap to
With this option, the selected time range rounds down to the beginning of the current time period. For example, if it is 10:53 on a Tuesday and you snap to day, you will see data beginning at 00:00 on that same Tuesday. If it is 10:53 and you snap to hour, you will see data beginning at 10:00. Breaking it down further, if it is 10:53:17 and you snap to minute, you will see data beginning at 10:53:00.
Click on the time-range indicator and click on the snap to tab. Choose from one of the preset interval options on the right, then click apply.
The interval selected will be shown in the time-range indicator. You will see this icon
When you snap to a selected time, you can click the play button to activate real-time data flow in your Activeboard or widget.
Date language expressions
Devo allows you to manually enter a time range in the indicator for both your entire Activeboard or individual widgets, giving you more flexibility and precision when searching your data. Simply click on the time range indicator in the top right and enter the desired dates or edit existing ones. The background of the time range indicator changes to red until a valid date is entered. Note that your from date cannot be after your to date and your to date cannot be in the future.
You can use a mix of both absolute and date language expressions in any given time range (for example, the to date can be relative and the from date absolute, and vice versa). For date language expressions, the current moment "now()" is used as the reference point:
Now look at how this is reflected in the widget:
With date language expressions, use a series of mathematical operations to move away from the current time which is used as the reference point. You can use multiple operators at once and the execution order is from left to right:
|Snap to (@) or |<||Rounds the date to the beginning of a time unit. Note that this operator only works with 1m, 1d, 1h, 1w, 1W, 1M and 1y.||now() @ 1m or now() |< 1m|
|Arithmetics (+/-)||Applies an offset to the date (date + offset or date - offset)||now() - 3h|
|Replace (^)||Replaces part of the date by a time unit (date ^ time_unit)||now() ^ 6d|
|Backward & forward (>>/<<)||Shifts the date to the next/past time unit (date >> time_unit or date << time_unit)||now() << 11M|
Let's suppose the current time (which we refer to as "now()") is Sunday, 05 February 2017, 13:37:05. The table below shows the resulting time when different expressions are applied. Not that this isn't an exhaustive list:
now() - 60m
60 minutes ago
Sunday, 05 February 2017, 12:37:05
now() @ 1h
Now (rounded to the beginning of the hour)
Sunday, 05 February 2017, 13:00:00
now() - 24h
24 hours ago
Saturday, 04 February 2017, 13:37:05
(now() - 1d) @ 1d
Yesterday (rounded to the beginning of the day)
Saturday, 04 February 2017, 00:00:00
(now() - 2d) @ 1d
2 days ago (rounded to the beginning of the day)
Friday, 03 February 2017, 00:00:00
(now() - 2d) @ 1m
2 days ago (rounded to the beginning of the minute)
Friday, 03 February 2017, 13:37:00
((now() - 2d) @ 1d) - 2h
2 days ago (rounded to the beginning of the day minus 2 hours)
Thursday, 02 February 2017, 22:00:00
now() @ 1w
Sunday, 05 February 2017, 00:00:00
now() @ 1W
Monday, 30 January 2017, 00:00:00
now() ^ 6d
Replace the day with 6
Monday, 06 February 2017, 13:37:05
now() ^ 2018y3M6d15h30m20s
Replaces the year with 2018
Replaces the month with 3
Replaces the day with 6
Replaces the hour with 15
Replaces the minutes with 30
Replaces the seconds with 20
Tuesday, 06 March 2018, 15:30:20
now() >> 2M
Forward to next second month
Monday, 05 February 2018, 13:37:05
now() << 2M
Backward to previous second month
Friday, 05 February 2016, 13:37:05
now() >> 2M6d15h20m10s
Forward to next second month, sixth day, fifteenth hour, twentieth minute and 10 seconds
Tuesday, 06 February 2018, 15:20:10
|now() << 1h/1d||Goes back to the first hour of the current day. Minutes and seconds don't change.||Sunday, 05 February 2017, 01:37:05|
Let's take a look at the mathematical operators in action. Imagine that the current moment, which we always refer to as "now()" is Tuesday, 13 October 2020.
- In this example we want to show data from 6 days ago, rounded to the beginning of the day. To achieve this we enter "now() - 6d @1d" in the from field and "now()" in the to field.
2. In this example we want to replace the current month with July and the current day with the first of the month. We want to shift our to date back to August. To achieve this we enter "now() ^7M1d" in the from field and "now() <<8M" in the to field.
3. Here we want to hone in further on the previous example. We want to replace our current moment to 22 July and subtract 5 hours. We want to shift our to date back to August and subtract 13 days. To achieve this we enter "(now() ^7M22d)-5h" in the from field and "(now() <<8M)-13d" in the to field.