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
0 -
With help of the Sisense suppor tteam the widget works now. BUT I have an assumption that it works without the custom action described above. The creator of this widget should have a look
0 -
Great approach!
How about complicating it and using "To" from a different field, i.e. if I have StartDate and EndDate fields and I need to filter in between.
0 -
Hi @Kaitleen Crowe,
Can you please share google drive access to hemlatamingwal2015@gmail.com.
Thanks,
Hemlata
0 -
Hi Kaitleen Crowe,
Could you please share with me also? Thank you in advance!
email: zhekov.andrey@gmail.com
Best regards,
Andrey
0 -
Hi Everyone,
I'm happy to announce on our recent marketplace - Date Range Filter
The plugin is aimed to be a premium version of the date range capabilties that you get with the out of the box BloX widget together with the community templates.
Like all our plugins, the plugin is officially supported for all Sisense versions that were released in the last 12 months including both Linux and Windows distributions.
Checkout the product's listing page or the below video to see a deeper dive intro with the widgets and the kind of things you can do with it without coding:
Feel free to reach out if you'de like to trial the plugin.
Cheers (:
Ravid
0 -
Hi Kaitleen Crowe,
Could you please share with me also? Thank you in advance!
email: ramireddy.m@isocrates.com
Best regards,
Andrey
0 -
Hi Kaitleen,
Your solution seems very good! Unfortunately, I am trying to view the URLs provided but I don't have access.
Could you please share with me also? My email is: michalis.gregoriou@retailzoom.net
Thanks in advance,
Michalis
0
Please sign in to leave a comment.
Comments
8 comments