Skip to main content

Lookup & Reference Calculated Fields

Lookup and reference fields will allow you to work with your current spreadsheet and dashboard, returning text references to cells, rows and dashboard variables.

note

All samples included in the table below were created with the HR Dataset 2016 spreadsheet.

Lookup and Reference functions

Function NameSyntax and Sample
previous: previous allows you to get a result with the value of the field you choose as your expression.Syntax: previous({expression},{first value})
Sample: previous([Wage],1)
row: row returns the number of the current row for every row in your data source.Syntax: row()
Sample: row()

Previous

The previous calculated field allows you to get a result with the value of the field you choose as your expression. There are two arguments for you to configure:

  • expression: one of the fields in your data source.

  • first value: the value for your first row, which will be empty by default.

Sample

The following is an extract of the HR Dataset 2016 "Employees" sheet.

EMPLOYEEIDFULLNAMEDEPARTMENTOFFICEWAGE
1.00Joan BaezDevelopmentMontevideo, Uruguay36542.00
2.00Zurbuch ThompsonDevelopmentCranbury, New Jersey, USA76865.00
3.00Zimmermann MillerDevelopmentCranbury, New Jersey, USA73768.00
4.00Zurcher ReidDevelopmentSofia, Bulgaria36018.00

Let's add the following calculated field:

previous([Wage],1)

The results of the calculated field will be:

EMPLOYEEIDFULLNAMEDEPARTMENTOFFICEWAGEprevious Field
1.00Joan BaezDevelopmentMontevideo, Uruguay36542.001.00
2.00Zurbuch ThompsonDevelopmentCranbury, New Jersey, USA76865.0036542.00
3.00Zimmermann MillerDevelopmentCranbury, New Jersey, USA73768.0076865.00
4.00Zurcher ReidDevelopmentSofia, Bulgaria36018.0073768.00

As seen in the table, the second row returns the [WAGE] value for the second row, and fills the first cell of the column with 1, as set in your formula.