You can add functions to the spreadsheet in order to perform calculations, for example.
Prerequisite
A table view is created for the query or the ad-hoc analysis.
Procedure
Start the query or the ad-hoc analysis.
Click Output if the table is hidden.
Activate the Data tab bar.
If you are editing a query, click the Template table.
Click in a cell.
Click Insert formula > Insert formula. The Insert formular dialog opens.
Click the relevant formula.
Click OK. The formula is inserted in the cell.
Determine the area to which a calculation will be valid, e.g, for cells A1 to A5. You do not have to enter the area, you can select it by holding down the mouse button.
Press Enter.
You have inserted the formula.
The table result is updated once you have clicked Evaluate table in the Start tab bar.