FIND - Returning the Position of a Specified Character in Text

  • Last update:August 28, 2023
  • Overview

    Grammar

    FIND(find_text,within_text,start_num)

    Returns the first specified substring (find_text) in the character string (within_text) starting from the index position (start_num).

    iconNote:
    For real-time data, a defaulted value needs to be added if there are fewer than 3 parameters in the function.

    Parameter 1

    find_text

    A substring to be found

    Parameter 2

    within_text

    A string containing the substring to be found (find_text)

    The search starts from the first character of within_text. If start_num is not specified, the default value 1 is used.

    Parameter 3

    start_num

    Index position where the search starts.

    iconNote:
    Negative values are not supported in real-time data.


    iconNote:
    The function returns 0 if no find_text is found.

    Notes

    • The first and second parameters of the FIND function are of any type and the third is a number that can be defaulted.

    Example

    Take fuzzy search as an example, which is similar to the LIKE operator in SQL.

    Add a formula column to label values containing Women, Men, and other characters in Category description in the built-in Store sales statistics dataset as "Women Products", Men Products", and "Others", respectively.

    Enter the formula IF(FIND("Women",Category description)!=0,"Women Products",IF(FIND("Men",Category description)!=0,"Men Products","Others")), as shown in the following figure.

    FIND.png


    iconNote:
    Only values of Category description fields displayed with a blue background are valid.

    The following table explains each part of the formula above.

    Formula
    Explanation

    FIND("Women",Category description) != 0

    Returns TRUE if the Category description field contains "Women", otherwise, returns FALSE.

    IF(FIND("Women",Category description)!=0,"Women Products",IF(FIND("Men",Category description)!=0,"Men Products","Others"))

    Labels Category description fields containing Women as "Women Products", Men as "Men Products", or otherwise, as "Others".

    The following table describes more examples.

    Formula
    ResultNotes
    FIND("I","Information")

    Single Login Setting

    Returns the index position of "I" in "Information", that is, 1.

    FIND("o","Information",2)

    Login Authentication Setting


    FIND("o","Information",-1)

    Null

    Negative values of start_num are not supported in real-time data.

    FIND("t","Information",1)

    8



    附件列表


    主题: Advanced Data Analyis
    Previous
    Next
    • 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