Calculations

Modified on Fri, 1 May, 2020 at 9:06 PM

The previously mentioned constant values (see Constant Values) and dynamic values (see Dynamic Values) can not only be used on their own, but they can be used in calculations by using the following operators:

&This operator can be used to concatenate two text values.
+
This operator can be used to add up two numeric values.

This operator can be used to subtract the numeric value right of the operator from the numeric value left of the operator.
/
This operator can be used to divide the numeric value left of the operator by the numeric value right of the operator.
*
This operator can be used to multiply two numeric values.


The syntax to concatenate the texts Hello and World is as follows:

"Hello" & " World"

You cannot only use constant values in these expressions; you could, for example, use the following expression to add value of the datasource field NetAmount and the value of the datasource field VatAmount; we assume here that these fields are both in the datasource Invoicing.

[Datasource].[Invoicing].[Field].[NetAmount] + [Datasource].[Invoicing].[Field].[NetAmount]

You can also mix constant values and dynamic values in these calculations; if you want to divide the datasource field YearlyRevenue of datasource Invoicing by 12 (e.g. in order to get an average monthly revenue value), you can use the following syntax:

[Datasource].[Invoicing].[Field].[YearlyRevenue] / 12

The dynamic values used do not necessarily have to belong to the same datasource; you could also write expressions which calculates values from different datasources, combined with constants.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article