Filter Component Linkage

  • Last update:  2023-12-26
  • Overview

    Expected Effect

    If you use the filter component linkage function, the option values of the subsequent filter component can vary with the changes of the values in the previous filter component. For example, choose Arizona from the drop-down list of the first filter component (State). You can view that the options in the second filter component (City) are automatically changed to cities belonging to Arizona, as shown in the following figure.

     1.png

    Implementation Method

    You can achieve the filter component linkage effect through the default linkage or parameter linkage function.

    1. Default Linkage

    FineBI supports the default linkage function for the filter component. You just need to bind data with the filter component. Then FineBI can automatically read the association relationship in the bound data, achieving the component linkage effect.

    The association relationship in data must be one of the following two types.

    • Data in the linked component comes from one table.

    • For two tables with the association relationship, data in the component in front of the linkage component can be from any field of the primary key table, while data in the component behind the linked component can be from any field of the foreign key table.

    2. Parameter Linkage

    • The parameter linkage function is applicable to SQL datasets with the parameter.

    • The parameter linkage function can only be used for direct connect data.

    Default Linkage

    This document takes the built-in table Regional Data Analysis as an example.

    FineBI can automatically achieve the filter component linkage effect if the association relationship exists between two fields.

    Creating a Group Table

    Drag the fields State and City to Dimension and the field Contract Amount to Indicator, as shown in the following figure.

     2.png

    Adding a Filter Component Named State

    1. Add a dashboard, drag the prepared component to the dashboard, and add a Text Drop-down Filter Component, as shown in the following figure.

     3.png

    2. Set the data source for the filter component, drag State to Field, and name the filter component State, as shown in the following figure.

     4.png

    Adding a Filter Component Named City

    The setting method is the same with that of the filter component State. Add a text drop-down filter component, drag City to Field, and name the filter component City, as shown in the following figure.

     5.png

    Effect Display

    Choose Arizona from the drop-down list of State. You can view that the options in the drop-down list of City are automatically changed to cities belonging to Arizona, as shown in the following figure.

     6.png

    Cancelling Default Linkage

    If you do not want the default linkage effect between two filter components, you can customize the control range and cancel the effect.

    Click State, click the Edit icon to go to the filter component edit page, and deselect City, as shown in the following figure.

     7.png

    Effect Display

     8.png

    Parameter Linkage

    The parameter linkage function can only be used for direct connect data.

    This document takes the table Reginal Data Analysis in BIdemo as an example.

    Adding a Table

    1. Create a SQL dataset with the State parameter and name the dataset Customer (with Parameter).

    Create a SQL dataset, enter the SQL statement select * from Regional Data Analysis where 1=1 <parameter> and State in ('${State}') </parameter>, set Default Value to Arizona, and click OK, as shown in the following figure.

     9.png

    2. Create a SQL dataset without the parameter and name the dataset Customer.

    Enter the SQL statement select * from Regional Data Analysis, as shown in the following figure.

     10.png

    Crating a Group Table

    Create a group table through the SQL dataset Customer (with Parameter). Drag the fields State and City to Dimension, and Count to Indicator, as shown in the following figure.

     11.png

    Adding a Filter Component Named State

    1. Add a dashboard, drag the prepared group table to the dashboard, and add a text drop-down filter component, as shown in the following figure.

     12.png

    2. Set the data source for the filter component, drag State to Field, and bind the State parameter (set in the table Customer (with Parameter)), as shown in the following figure.

     13.png

    iconNote:
    To select all states from the text drop-down filter component, you need to add the field State without the parameter.

    3. Name the filter component State, as shown in the following figure.

     14.png

    Adding a Filter Component Named City

    The setting method is the same with that of the filter component State. Click the table Customer (with Parameter), drag City to Field, and name the filter component City, as shown in the following figure. You do not need to bind the parameter for the filter component.

     15.png

    Effect Display

    Choose Arizona from the drop-down list of State. You can view that the options in the drop-down list of City are automatically changed to cities belonging to Arizona, as shown in the following figure.

    16.png

    Attachment List


    Theme: ダッシュボードの作成
    前の記事
    次の記事
    • いいね
    • 良くない
    • 閲覧しただけ

    フィードバック

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

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

    不再提示

    10s后关闭

    反馈已提交

    网络繁忙