Using Spreadic Formulas

You may have noticed by now that every time you run a Tabular Data or Pivot Data query, a formula is generated in the cell you select. In fact, you can copy this Spreadic formula to another cell or make certain changes to the formula - just like how other standard spreadsheet formulas work!

Tabular Data - the SPD_FETCH Function

Each parameter of the function corresponds to one section of the UI in the Tabular Data mode (and in the exact same order). For example, the first parameter of the function is the name of the model, whereas you are asked to choose a model from the list in the top section of the UI in Your First Spreadic Query.

Other parameters work rather similarly, with the only point to note about syntax is the use of hash (#) as a separator whenever there are multiple selected fields or filtering / ordering conditions. There is also a prompt that helps you with the general syntax of the formula.

The field names used in Spreadic Formulas are always in their original format (i.e. as in a SQL query).

If you are familiar with SQL, you may choose to input filtering conditions (in the appropriate SQL dialect) directly into the place for filter parameter.

There is also a way to retrieve the actual SQL query generated by the Spreadic formula, which could be useful for troble-shooting any errors. Simply input SPD_RETRIEVESQL(your SPD_FETCH parameters) into another cell, and the SQL query will be returned.

Pivot Data - the SPD_PIVOT Function

This function again works in sync with the Pivot Data mode - the parameters are in the same order as the input prompts in the UI.

There is also a SPD_RETRIEVEPIVOTSQL function that works similarly to retrieve the SQL query generated by the Spreadic function.

Cell Referencing

The example below shows how you can, say, reference a spreadsheet cell as an input to the filter parameter:

Last updated