For the complete documentation index, see llms.txt. This page is also available as Markdown.

Custom calculations

DrillDownTree lets you add your own calculations as measures, such as a profit ratio. Custom calculations are computed on the aggregated values of each node, so a ratio like SUM(Profit) / SUM(Sales) gives the correct ratio at every level of your tree.

A Profit ratio calculation in the Alias & Calculation section

Add a custom calculation

  1. In Customize measures, click + below Measures. A new measure called "Calculation" followed by a number is added at the top of the list.

  2. Open Alias & Calculation and enter a name for your calculation in Alias.

  3. Write your calculation in the Custom calculation box:

    • Type @ and pick a measure from your data. DrillDownTree inserts its name, for example SUM(Profit).

    • Type # or use the operator buttons to add +, -, *, / and parentheses. Select part of your calculation and click () to put it between parentheses.

    • You can use numbers too, for example SUM(Profit) / SUM(Sales) * 100.

  4. Click Save.

Your calculation now appears in the measure switcher, and you can format it like any other measure.

A custom calculation can only use measures from your data, not other custom calculations. When DrillDownTree doesn't understand a calculation, it shows "Invalid Calculation" and doesn't save it.

Rename a measure

You can use Alias for measures from your data too. Select the measure, enter a new name in Alias and click Save. The alias is shown in the measure switcher, the tooltip and the legend.

Last updated

Was this helpful?