Extracting Data from One of Two Time Columns

  • Last update:  2023-09-28
  • Overview

    Application Scenarios

    Scenario description: In the sample data Resume Table, some employees only filled in their middle school graduation time, some only filled in their university graduation time, and others filled in both. Due to employees' different educational backgrounds, their final graduation time cannot be displayed in one column. To solve this problem, you can extract employees' final graduation time from data of multiple columns.

    Example: The following table contains two raw data columns, A and B, and you need to add a column C. Column condition: Returns the values of B when A is empty; returns the values of A when B is empty; returns the maximum values of A and B when they are both not empty.

    1.png

    Implementation Method

    In FineBI, you can use the IF and ISNULL functions to determine whether a field is empty and use the DATESUBDATE function to return the maximum values of A and B. The following document introduces the procedures of the above example in detail.

    Procedures

    Adding Data

    1. Download sample data: Resume Table.xls

    2. Create an analysis subject and upload the sample data with all fields selected by default.

    2.png

    3.png

    3. The preview of the uploaded data is shown in the following figure.

    4.png

    Editing Data

    1. Add a Formula Column named C and enter the formula IF(ISNULL(A),B,IF(ISNULL(B),A,IF(DATESUBDATE(A,B,"d")>0,A,B))). The IF, ISNULL, and DATESUBDATE functions are used to respectively determine the condition, determine whether a field is empty, and compare the values of two time fields.

    iconNote:
    The time fields A and B need to be selected from the left column and cannot be entered manually.

    5.png

    2. Click OK and the added column C is displayed in the preview area, as shown in the following figure.

    6.png

    Demonstration

    Click Save All and Update and then click  to return to My Analysis. You can see the added column C in the automatically updated Data Preview tab.

    7.png

    附件列表


    主题: 选择并编辑数据
    • Helpful
    • Not helpful
    • Only read

    滑鼠選中內容,快速回饋問題

    滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。

    不再提示

    10s後關閉

    Get
    Help
    Online Support
    Professional technical support is provided to quickly help you solve problems.
    Online support is available from 9:00-12:00 and 13:30-17:30 on weekdays.
    Page Feedback
    You can provide suggestions and feedback for the current web page.
    Pre-Sales Consultation
    Business Consultation
    Business: international@fanruan.com
    Support: support@fanruan.com
    Page Feedback
    *Problem Type
    Cannot be empty
    Problem Description
    0/1000
    Cannot be empty

    Submitted successfully

    Network busy