Table calculations let you add your own calculated columns to an Upsales Insights report, based on the fields already in it. Insights requires the Insights add-on.
To create table calculations, you must be an administrator or a user an administrator has added under Settings → Analytics → Upsales Insights → Users with explore access.
Add a table calculation
- Click Analytics → Upsales Insights and click Create:
- Choose the Explore that holds the data you want to use:
- Select the fields you want to calculate with. A table calculation can only use fields that are in the report's data table. Click a dropdown to drill down into more field options:
- In the field picker, click Add in the Custom Fields section and select Table Calculation. You can also click Add calculation in the Data section.
- Type your formula in the large text box. As you type, Looker suggests matching fields. Fields are written as
${view.field}. - Choose a Format (for example a percentage), enter a Name and click Save.
- Click Run. The calculation appears as a new column in the data table.
For more about building the report itself, see Insights: How to create reports. For more formula examples, see Calculations in Insights.
Example: sales growth per company, year over year
- Create a report from the Sales & Pipeline Explore.
- Add Company Name (under Company) and Close Date → Year (under Sales & Pipeline Dates, shown as Close Year in the data table) as dimensions.
- Add Sales Value (Net) (under Sales & Pipeline) as the measure.
- Pivot on Close Year, and filter Close Year to the two years you want to compare. Keep the years sorted from oldest to newest, left to right.
- Add a table calculation with this formula and set its format to a percentage:
(${ordered_product.total_value} - pivot_offset(${ordered_product.total_value}, -1)) / pivot_offset(${ordered_product.total_value}, -1)
The formula compares each year with the year to its left, so the result shows how much each company's sales grew or shrank.