Articles on: Analyze

How do I use advanced custom calculations in Javascript?

Advanced custom calculations enable users to create more complex calculations using javascript. Below are examples of notation you can use to create calculations of varying complexity:


  1. Sum: this enables users to compute the sum of an indicator.


sum(data.values.[indicator])


  1. Cumulative sum: this enables users to create a column which displays the cumulative totals for the chosen dimensions.


cumulativeSum(data.values.[indicator])


  1. Difference: enables users to calculate the difference between two adjacent rows.


differenceFromPrevious(data.values.[indicator])


  1. Reading dimensions: this enables users to create analyses which references the text within a dimension field.


valuesWithDimension(data.values.[indicator], 'DimensionId', DimensionId)

Updated on: 24/09/2025

Was this article helpful?

Share your feedback

Cancel

Thank you!