How can I create a relative date filter on a datasource?

I know how to create those in widgets, but can I do the same on the datasource level in order to speed things up?
Eric

3 Replies

DG Dhivyabharathi Govindaraj Syncfusion Team October 12, 2017 07:31 AM UTC

Hi Eric, 

Yes, you can apply relative date filters on data source too. For this, 

  1. First  go to “Data filters” icon in dashboard designer.

 

  1. Now “Filters” window will open. Then choose “Add” button to add data filters.

 

  1. In Column combo box choose appropriate date column to apply relative date filters. Now in Formats combo box “Relative Dates” option will display .
 

  1. Choose relative date option and click “Customize” to open “Relative Date Filter” window. Now in relative date filter window apply your desired filter range just like in widgets level and update the filter. Now you got the filtered data’s in our designer application.

 


Please let me know if you need any further assistance on this.  

Regards, 
Dhivya. 
 



EK Eric Kok October 12, 2017 12:16 PM UTC

Is there a way to use unix timestamps for this as well? 

Eric 



KM Kavitha Murugesan Syncfusion Team October 13, 2017 10:57 AM UTC

Hi Eric, 
 
We assumed that you are using MySQL as datasource type and also assume your Unix Timestamp datatype as integer.  At first, you have to convert the Unix Timestamp to date format by creating the expression in expression designer like below. 
 
Expression : FROM_UNIXTIME([UnixTimeStampColumn]) 
 
After this, you can apply the relative date filter at widget level as like below. Currently, we don’t have support to apply datasource level filter for expression column.  
 
 
 
If you want to use datasource level filter for Unix Timestamp data, your Unix Timestamp data must be converted into datetime format in your database server level. Otherwise, we don’t have the support to apply datasource level relative date filter for Unix Timestamp data which is displayed number format in our dashboard designer.  
 
 
 
Please let us know, if you need further assistance on this. 
 
Regards, 
Kavitha M. 
 


Loader.
Up arrow icon