Overview
Version
Functional Change | Functional Change |
---|---|
6.0 | / |
Application Scenario
The function can be used when the institution code in the institution code table has two columns: the current institution number and the direct superior institution number.
Take the Bank Institution table as an example. The institution code JGID of the Bank of Jiang Dantu New District Branch is 7018, and its direct superior institution code PARENT_ID is 0711, which means that the Bank of Jiang Dantu New District Branch is directly subordinate to the Bank of Jiangyuan City Branch.
A hierarchical relationship helps classify various banks into different levels and make clear their hierarchical relationships, as shown in the following figure.
Usage Scope
The function applies to a table with two columns of its own ID and parent ID. If the table only has one column that can be used to describe the hierarchical relationship, you can refer to Self-Looping Column (Hierarchy Based on One Columns of Data).
The Self-Looping Column function is available to basic tables and not supported for self-service datasets and direct-connected data tables.
Example
Field Settings
1. Select the database BIdemo_Bank_Institution in Public Data, and click Edit, as shown in the following figure.
Field Description
JGID | Bank ID |
PARENT_ID | Direct superior bank's ID |
2. You need to ensure that both ID columns for hierarchy building are text fields. If not, you need to convert their field types into Text, as shown in the following figure.
Self-Looping Column
1. Click Self-Looping Column.
2. Set the conditions required for the self-looping column, and click Build Association.
Self-Looping Column Type | Set Self-Looping Column Type to Hierarchy Based on Two Columns of Data. |
ID Column as Hierarchical Dependence | Select the bank ID. |
Parent ID Column | Select the ID column of the parent or superior bank. |
Hierarchical Result Field | Select the name of the bank or institution. |
4. FineBI automatically builds the hierarchical relationship of the bank, with a total of five levels. Modify their names to Head Office, First-level Branch, Second-level Branch, First-level Subbranch, and Second-level Subbranch, as shown in the following figure.
After updating the table, you can use the hierarchical fields generated by the self-looping columns to create self-service datasets and new dashboards.
Effect Display
For details, see section "Application Scenario."