Value Function 

  • Last update:March 13, 2025
  • Overview

    Function Role

    Sometimes, you want to extract the data meeting required conditions in certain columns and rows directly from the dataset instead of extracting the data from the cell where fields from the dataset have been dragged and filtering conditions have been added. In this case, you can use the value function.

    Function Explanation

    The value function can be written in multiple ways. Different parameter combinations correspond to different data extraction rules.

    The simplest syntax is Value(Dataset name in the designer,Index of a required column in the dataset).

    For example:

    =value("ds1",3) returns the data in the third column from the dataset ds1 as an array.

     

    Syntax:

    SyntaxVALUE(tableData,col)This function returns the values in the column specified by col from tableData.
    Parameter 1 tableData 

    Mandatory

    This parameter specifies the name of the report dataset or the server dataset instead of the name of the table in the database.

     Parameter 2col 

    Mandatory

    This parameter specifies the column index (which needs to be an integer).

    Notes

    The parameters in the value function can be set by a variety of methods. You can enter the parameters directly in the function formula or reference cell and template parameters.

    For example:

    value("ds1",1,2) returns the data in the first column of the second row from the dataset ds1.

    value("ds1",A1,A2) returns the data in the column indexed to the value in cell A1 of the row indexed to the value in cell A2.

    value('ds1',1,2,"beef") returns the values corresponding to the value beef in the second column from the first column of ds1. beef can be changed to the cell data.

    value($p1,1,$p2) returns the data in the first column of the row indexed to p2 from the dataset specified by p1. p1 (assigned as the dataset name) and p2 are template parameters.

    The syntax value("dataset",1,-1) is not supported, as -1 does not take effect. If you need the data in the last row of a column, you can use the similar formula VALUE('ds1',COUNT(value("ds1",3,4,"America"))) to extract the data.

    Application Scenario

    Use the built-in data CUSTOMER as sample data.

    Template Creation

    Create a template, and enter the SQL statement SELECT * FROM CUSTOMER to create ds1, as shown in the following figure.

     value.png

    Data Extraction with Formulas

    Enter the following formulas in the cells respectively:

    Formula Returned ValueEffectFormula Syntax Description
    =value("ds1",3,2) This function returns the value Wshaington in the second row of the third column from the table CUSTOMER.222.png Value(tabledata,col,rowThis function returns the value in the column indexed to col of the row indexed to row from tabledata.

    =value("ds1",3)

    iconNote: 
    Since the returned data is an array, you need to set Expansion Direction to Vertical.


    This function returns the data in the third column from ds1. 333.pngValue(tableData,colThis function returns the value in the column indexed to col from tableData.

    =value("ds1",3,4,"America")

    iconNote: 
    Since the returned data is an array, you need to set Expansion Direction to Vertical.
    This function returns the element corresponding to the value America in the fourth column from the third column of ds1444.pngValue(tableData,targetCol,orgCol,element  This function returns the element corresponding to the value element in the coloumn indexed to orgCol from the column indexed to targetCol of tableData.
    =value("ds1",3,4,"America",1)  This function returns the first element corresponding to America in the fourth column from the third column of ds1.555.pngValue(tableData,targetCol,orgCol,element,idx

    This function returns the No.idx element corresponding to element in the column indexed to orgCol from the column indexed to targetCol of tableData.

     

     


    Attachment List


    Theme: Report Features
    • Helpful
    • Not helpful
    • Only read

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

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

    不再提示

    9s后關閉

    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