Using URL parameters to filter start and end date

Comments

3 comments

  • Avatar
    Candido Dessanti

    Hi Dan Balaban

    I'm truly sorry for this late reply but the system for whatever reason filtered out your message.

    it's true that apparently you cannot use parameters with date/timestamp datatypes, but defining the parameter as custom and using a custom filter is going to do the work.

    create two custom parameters called start_date and end_date, defining a default values like '1970-01-01' and '2058-31-12'

    In the object or in the filter panel and Create a SQL Filter


    write a sql expression e.g. starttime between date '${start_date}' and date '${end_date}'


    And apply the filter.

    Now you can apply your custom filters using the values you specify in the URL e.g.

    https://localhost:6273/heavyai/dashboard/2?tab=-MvXehh9cf7ueJPtEYrT&parameter.start_date=1970-01-01&parameter.end_date=2015-02-07

    If you define the filter in the datasource all the datasource will be filtered for the values you specified, while if specified at chart level, only that chart will be filtered

    I hope this helps,
    Candido

    0
    Comment actions Permalink
  • Avatar
    Dan Balaban

    I appreciate the reply. Thank you so much for the help, Candido!

    0
    Comment actions Permalink
  • Avatar
    Candido Dessanti

    If you need further help, feel free to ask.

     

    the next time the response will be more timely for sure.

    Regards,
    candido

    0
    Comment actions Permalink

Please sign in to leave a comment.