反馈已提交

网络繁忙

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

Filter assembly linkage

  • Recent Updates: April 25, 2022
  • 1 Overview

    1.1 Expected effect

    Filter component linkage means that the optional values of the following filter components change with the selection of the previous components. For example, the first filter component selects Jiangsu Province, and the selection range of the second component becomes cities in Jiangsu Province, as shown in the following figure. :

    image.png

    1.2 Implementation ideas

    You can use the default linkage or parameter linkage to achieve:

    • The default linkage requires that the fields used by the two filtering components have an association relationship or be in a self-service data set.

    • Parameter linkage is applicable to SQL data sets with parameters.

    2. Default linkage

    The sample data uses the Demo data sheet "Regional Data Analysis".

    When there is a relationship between two fields, FineBI can realize automatic linkage.

    2.1 Create a new group table

    Drag "Province" and "City" into the dimension, and drag "Contract Amount" into the indicator column, as shown in the figure below:

    image (1).png

    2.2 Add province filter component

    1) Drag in a text drop-down filter component, as shown in the figure below:

    image (2).png

    2) Set the data source of the filter component, as shown in the figure below:

    image (3).png

    3) Set the name of the filter component to "province", click the component, select drop-down> edit title, and enter the province, as shown in the figure below:

    image (4).png

    2.3 Add city filter component

    Same as the setting method of the "province" filter component, set the filter field to "city", and name the filter component as city. As shown below:

    image (5).png

    2.4 Viewing the effect

    Select the province as Zhejiang, you can see that the selection of cities is reduced to Zhejiang cities, as shown in the figure below:

    image (6).png

    2.5 Description

    FineBI supports the default filter component linkage effect, that is, you only need to bind the data to the filter component, and FineBI will automatically read the association relationship between the bound data to realize the component linkage. The association relationship between the data must be as follows One of two relationships:

    • The data in the linkage component comes from a table.

    • The two tables establish an association relationship. The component in front of the linkage component can be any field in the primary key table, and the data in the following component can be any field in the foreign key table.

    3. Parameter linkage

    Parameter linkage is supported when only real-time data is directly connected to the database, and the filter component is linked through parameter transfer.

    The sample data comes from Demo_CUSTOMER of BI Demo.

    3.1 Add table

    1) Select direct in the data list to switch to real-time data

    image (7).png

    2) Create a new SQL data set with province parameters and name it "Customer with Parameters".

    Create a new SQL data set, enter the SQL statement select * from DEMO_CUSTOMER where 1=1 <parameter> and province in ('${province}') </parameter>, set the default value to Jiangsu Province, and click OK to save, as shown in the figure below Show:

    image (8).png

    3) Create a new SQL data set without parameters and name it "Customer".

    Enter the SQL statement select * from DEMO_CUSTOMER, as shown in the following figure:

    image (9).png

    3.2 Add province filter component

    1) Create a new dashboard and add a text filter component to the page, as shown in the figure below:

    image (10).png

    2) Set the data source of the filter component, drag the province from the "Customer" table into the field, and bind the province parameter (this parameter is the parameter previously set in the "Customer with parameters" table), as shown in the following figure:

    image (11).png

    Note: Add the province field without parameters to the text filter component, so that all province values can be selected when the filter component selects the field.

    3) Name the filter component as province, as shown in the figure below:

    image (12).png

    3.3 Add city filter component

    Same as the setting method of the "province" filter component, select the "customer with parameters" table, set the filter field to "city", do not need to bind parameters, and name the filter component as city. As shown below:

    image (13).png

    3.4 New group table

    Use the SQL data set "Customer with Parameters" table to create a new grouping table, drag "Province" and "City" into the dimension column, and drag "Index" into the indicator column, as shown in the following figure:

    image (14).png

    Click the Enter Dashboard button.

    3.5 Effect view

    Select the province as Jiangsu, you can see that the selection of cities is reduced to the cities of Jiangsu, as shown in the figure below:

    image (15).png

    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后关闭