反馈已提交

网络繁忙

You are viewing 5.1 help doc. More details are displayed in the latest help doc.

[Direct] Passing parameters in date interval filter component

  • Recent Updates: April 25, 2022
  • 1. Overview

    1.1 Version Support

    FineBI
    Feature Update
    5.1-
    5.1.5Fuzzy search is supported when searching for parameters in filtering component "bind parameters"

    1.2 Problem

    Because the amount of data in the original table is too large, it may sometimes cause the memory or disk to be full. Therefore, it is usually necessary to use a where statement and filter conditions to control the amount of data. The addition of a fixed value after the where statement will make the access inflexible. In this case, you can use parameters to dynamically control the amount of data accessed by BI, for example, fetch all data in a dynamic time period.

    For example, we may select only records in 2010 May using the date interval component.

    image.png

    1.3 Solution

    Add a SQL data set and configure two parameters in the SQL statement: start time and end time.

    Use the "Date Interval Filtering Component" to bind parameters in the dashboard to filter out the data for the May of 2010.

    2. Procedure

    2.1 Add a SQL dataset

    Select "Data Preparation", enter the business package, and click "Add Table> Add SQL Data Set", as shown in the figure below:

    image (1).png

    Name the dataset as Inventory(date). Enter the following SQL

    select * from inventory where Date between '${start_time}' and '${end_time}'

    Click "refresh", select the parameter type as "Date" and select the default value, click "OK", as shown below.

    image (2).png

    Note 1: The example is the SQL statement of the date interval filter component. For details on the writing method of other date types, please refer to: SQL Data Set Parameter Writing Example.

    Note 2: The default value can be selected arbitrarily. The default value is empty, that is, all are selected.

    2.2 Create a dashboard

    Create a dashboard and use the fields in inventory(date) to generate a detailed table.

    image (3).png

    2.3 Bind parameters on the data interval filter component

    Add the "date interval" filter component, select the binding parameters, and click OK to select the parameter. The selected parameter can be used for fuzzy search, as shown below:

    2.4 Effect preview

    See section 1.2

    Attachment List


    Theme: Build Charts and Analyze data
    Already the First
    Already the Last
    • Helpful
    • Not helpful
    • Only read

    售前咨询电话

    400-811-8890转1

    在线技术支持

    在线QQ:800049425

    热线电话:400-811-8890转2

    总裁办24H投诉

    热线电话:173-1278-1526

    文 档反 馈

    鼠标选中内容,快速反馈问题

    鼠标选中存在疑惑的内容,即可快速反馈问题,我们将会跟进处理。

    不再提示

    10s后关闭