Datarails for Google Sheets: Get Data

Get data is how Datarails data reaches your cells. It offers three routes:

Route What it does
Formulas Puts a Datarails value in a cell, which you then repeat across the report
Report builder Generates a whole report at once, with rows, columns and the figures between them
Data tables Brings a filtered extract of your data into the sheet as rows

Whichever you use, the numbers arrive when the report is refreshed. 

Formulas

What is in the cell

A Datarails cell shows the number, and the add-on keeps the query behind it with the cell, so you can refresh, edit and repeat it. 
Two things you may see instead of a number: 

  • #NAME? just after a Datarails formula is typed into a cell. The add-on fetches the value as soon as you leave the cell, so this is usually brief.
  • Missing when the report needs a figure that has not been fetched yet, for example in cells you have just filled in, or right after a filter change.

How a formula is built

A formula has three parts.

The DR formula starts the query. DR.GET is the one you will use.

The function defines what is being extracted: the value, the table it comes from, and how it is calculated. Functions are listed in the panel with the value they aggregate, such as SUM of Amount.

The conditions narrow the result: the reporting month, the scenario, the account, the department, or any other field in your data. They come in pairs, a field and a value.

An example: =DR.GET(Value,"[Report_Field]","Interest Income","[Reporting Month]",31/12/2024,"[Scenario]","Actuals")

  • DR.GET starts the query
  • Value is the function, summing the Amount field from your financials table
  • the rest are conditions: the report field, the month and the scenario

    For the full set and what each returns ,see The Datarails Add-In: DR Formulas.

Point conditions at cells

A condition can be a fixed value, or it can point at a cell.

Pointing at a cell is what makes a report reusable. Put the month in a column header and the account in a row label, point the conditions at those cells, and the same formula serves the whole grid. The add-on re-reads those cells on every refresh, so changing a row label and refreshing updates the number.

Filling a formula down

Dragging a Datarails cell shifts its references. References you have fixed with $ stay where they are.

Formula builder

The formula builder assembles the formula for you, so you do not have to write it by hand.

  1. In the panel, open the formula builder.
  2. Choose the function that matches the data you need.
  3. Add your conditions, such as a reporting month, a scenario, or a department.
  4. Right-click the cell you want in the builder and choose Copy to clipboard.
  5. Paste it into the cell where you want the value.

The builder hands you the formula rather than writing it into the sheet, so you choose where it lands.

The formula builder, Edit conditions and Manage functions each open a window over your spreadsheet. Type formula is the exception and opens in the panel itself.

Type formula

Type formula is where you write or edit a Datarails formula yourself. 

Work here rather than in the Google Sheets formula bar. The cell holds the fetched number, so the formula bar shows you Google's own version of the formula. The panel shows the Datarails formula, which is what you wrote and is far easier to read.

It works like a formula bar:

  • Type or edit the formula in the Formula box.
  • Select cell, the icon beside the box, lets you click a cell in the sheet to reference it, instead of typing the address.
  • Copy formula puts it on the clipboard.
  • Apply to cell writes it back to the cell, which then recalculates.

Edit conditions

Edit conditions changes the conditions on the formula in the selected cell, not the function behind it.

Each condition is listed, and you can point one at a cell instead of a fixed value, add another, or remove one. When you finish, the formula updates in the cell.

To narrow a formula to a period, or a range of periods, see The Datarails Add-In: Date Ranges in Formulas.

To match several values at once, a condition can take a list rather than one value, see The Datarails Add-In: Average and Count Unique with DR.INCLUDE.
 

Manage functions

Manage functions is the central place for the functions available to you, which are your organization's functions rather than this spreadsheet's. It lists each function with the value it aggregates, and lets you browse, search, create, edit and delete.

Functions are added to your spreadsheet automatically, so a function a colleague created is available to you without anyone adding it by hand.

Create a function

A function defines the value you are pulling, the table it comes from, and how it is calculated.

  1. Get data > Formulas > Manage functions > click the + icon on the top right.
  2. Give it a name. This is the name you will see in your formulas.
  3. Under Table, choose where the data lives. Its fields are then listed.
  4. Drag the numeric field you want, for example Amount, into Value.
  5. Optionally drag fields into Filters to limit what the function returns.
  6. Set the default aggregation field, for example Reporting Month.
  7. Save.

Report builder

The report builder generates a complete report rather than a single figure. You choose what goes down the rows, what goes across the columns, and which figures fill the grid.

The builder opens over your spreadsheet, and the finished report is written into a new sheet. 

From the same place you can manage the reports already in the workbook.


See The Datarails Add-In: Report Builder.

Data tables

A data table is a filtered extract of your Datarails data, brought into the sheet as rows, for when you want the detail itself rather than an aggregated figure.

Three options: Add table, Edit selected and Manage tables.

Add a table

  1. In the panel, choose Add table.
  2. Give the table a name.
  3. Under Table, select the source table your data comes from. Its fields are then listed, and you can search them.
  4. Drag the fields you want into Display fields. Their order is the column order, and you can rearrange them by dragging.
  5. To narrow the rows, drag fields into Filters.
  6. Optionally turn on Dimension table, or Remove duplicates to show each row only once.
  7. Save. The table is saved and the screen returns to your list of tables.
  8. Pick it in the list to place it in the sheet.

Edit and manage

Edit selected works when your cursor is inside a table, and opens it with its current configuration.

Manage tables lists every data table you have, with the database table behind each. From there you can add an existing table to this spreadsheet, and edit, clone or delete one.

A table refreshes in place, and any columns you have added beside it are kept.

Reference date

The reference date is the date your report is built around. Date-scoped functions resolve as of this date, so the same report can be taken through any period without editing a formula.

  1. In the panel's quick actions, open Set date.
  2. Choose the Format, which sets whether you are picking a day, a month, a quarter or a year.
  3. Pick the period.

The date is stored as the end of the period you chose, so a month resolves to its last day. It is saved in the spreadsheet rather than per person, so everyone who opens the file works on the same period, and the report refreshes on the new date.

To show the date in the sheet itself, use Insert reference date here from the Datarails menu, which mirrors it into the selected cell.

Filters

Filters slice the whole report at once. Select a value for a dimension, such as an entity, a department or a scenario, and every formula and table that shares that field follows the selection. Changing a selection refreshes the report.

See Filters.

Tips

  • Point conditions at cells rather than typing values, so one formula can serve the whole report.
  • Build against the reference date rather than hard-coding periods, so the report survives the next close.
  • Keep layout formulas native. Subtotals, variances and percentages are ordinary Sheets formulas on top of Datarails values.

Getting help

Contact the Datarails Support team at support@datarails.com, or reach out to your dedicated Customer Success Manager.




© Datarails Ltd. All rights reserved.

Updated

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.