Select a date and time range to filter your dashboards:
1.Elasticube Model
The goal here is to convert the date & time field you wish to filter by to a BIGINT in the format (YYYYDDMMHHMMSS). Let's break that down.
- Choose your date & time field to convert.
- Create a new custom column in the same table.
- Convert the date & time field to a Bigint with the format (YYYYDDMMHHMMSS).
- Your values should not have '/' or '-'. If you have these characters, they will need to be parsed out.
Example:
In this example we will be converting the [Time] field into a custom column [FilterDate] as a BIGINT. **Note: Your date formats can vary so the method to convert will vary.
-- Changing datatype to bigint
tobigint(
--formatting date
replaceall(StrParts(tostring([Time]), ' ',1),'-','') +
-- formatting time
replaceall(left(SubString(tostring([time]),12),8),':',''))
2. Create new blox widget to dashboard
- Upload blox template. Download link below:
- https://drive.google.com/file/d/1i142Oh8cY2wUqK62l-2hNzuMt6fOtKSj/view?usp=sharing
3. Create a new custom action
- Copy and paste the Javascript code found in below txt file into the custom action editor
- https://drive.google.com/file/d/1UmD4a9tHr1iiKXYBpVWdnnGNpKtxl3OS/view?usp=sharing
- Give action a name, press next and save the new action.
- Copy the name of the new action
- Click the Editor tab
- Scroll to the actionset and under actions, change the type to the name of the action you created
4. Add the FilterDate you created in the model to the values panel.
5. Click filters tab in widget, ensure dashboard filters is disabled.
6. Add FilterDate to the dashboard filter panel.
- When adding this filter, go to the values tab,
- And select the 'between values' option
- Press ok
That’s it, now select a date & time in the picker and press the filter button
-
Kaitleen Crowe I followed your instructions step by step but the filter button is not working. Any ideas why? Do I maybe need ot change anything else in the blox editor tab?
Thanks,
Kostas
-
Hi @Kaitleen Crowe,
Can you please share google drive access to hemlatamingwal2015@gmail.com.
Thanks,
Hemlata
Please sign in to leave a comment.
Comments
4 comments