反馈已提交

网络繁忙

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

Data merging, interception, and split

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

    When performing data merging, the splicing and merging of fields and the split of columns are indispensable.

    Sometimes it is necessary to merge some of the required fields in the dataset.

    In the dataset, the field structure is a string connected by certain delimiters. When using it, it needs to be split to extract only the string at a fixed position, or the whole is split into multiple columns.

    2. Field Combination

    2.1 Fields are merged directly

    In versions after 5.1.12, the merging of text fields is achieved through "+", of course, the function CONCATENATE can also be used.

    Note: similar to & in Excel.

    For example, the last name and first name need to be merged into a field "name", as shown in the figure below:

    3.png

    Enter the formula: First name+Last name, then the fields are merged, as shown in the following figure:

    You can also use the CONCATENATE function, as shown in the figure below:

    4.png

    2.2 Merge fields and separate them with one character

    If you want to add a character to separate each field, you can also use "+".

    For example, to use the data in "package>FRDemo_map_WorldMa", you need to merge the "Continent", "Country", and "Capital" data and separate them with "-".

    Create a field, name the field and enter the formula: Continent + "-" + Country + "-" + Capital, click "OK", as shown below:5.png

    The resulting "Region" field is shown in the figure below:

    6.png

    3. Split fields

    According to the characters in the field, split the field into multiple columns.

    In FineBI, you can use functions to create "new column" or add "calculation indicator" to the dashboard to achieve field split.

    3.1 Example

    For example, you need to intercept phone numbers. For example, create a new field in the self-service dataset for sorting, and intercept the last eight digits of the "Home telephone" to construct a new field "phone number".

    1) Use Demo data "FRDemo_Employe_copy" to make a self-service dataset, select the fields "Full Name" and "Home telephone", as shown in the figure below:

    7.png

    2) Select the new column, use the RIGHT function, add the new column "phone number" to intercept the last eight digits of the phone number, and enter the formula: RIGHT(Home telephone, 8), as shown in the figure below:

    3.2 More formulas

    See the table below for more breakdown formulas.

    DemandFormula
    Characters only appear once in the fieldIntercept characters with a fixed number of digits

    RIGHT、LEFT、MID

    For example:RIGHT(Home telephone,8)

    11.png

    Get the contents of the field "before the character"

    LEFT(field name,FIND("character",field name)-1)

    For example:LEFT(Account and password,FIND(":",Account and password)-1)

    13.png

    Get the contents of the field "after the character"

    RIGHT(field name,LEN(field name)-FIND("character",field name))

    For example:RIGHT(Account and password,LEN(Account and password)-FIND(":",Account and password))

    14.png

    Remove the fixed number of characters after the field

    LEFT(field name,LEN(field name)-length of the characters that need to be removed)

    For example:

    12.png

    Remove the fixed number of characters before the fieldRIGHT(field name,LEN(field name)-length of the characters that need to be removed)
    Characters appear multiple times in the fieldTake the content after the last character in the field

    INDEXOF(SPLIT(field name,"_"),LEN(SPLIT(field name,"_"))-1)

    For example:INDEXOF(SPLIT(field name,"_"),LEN(SPLIT(field name,"_"))-1)

    15.png

    Take the content after the penultimate character in the field

    INDEXOF(SPLIT(field name,"_"),LEN(SPLIT(field name,"_"))-2)

    For example:INDEXOF(SPLIT(field name,"_"),LEN(SPLIT(field name,"_"))-2)

    16.png

    By analogy, you can achieve field separation...

    After sorting, you may need to merge multiple split fields into one column. At this time, you can use the upper and lower merge function. For details, see: Inverse Perspective.

    Attachment List


    Theme: Advanced Data Analyis
    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后关闭