Define or change a measure

To open the measure dialog, select a measure and click on "Edit", or double click on the measure label:



When the report is built, all the records (in the bag of records generated by your Data Source) which have the same combination of values of dimensions are aggregated to form a unique measure value.
Common functions used for aggregation are: count, sum, avg, etc. DataTime lets you choose among a large number of predefined functions.



Further, for extreme generality, it allows you to specify through code your own aggregate function. If you know how to write VB.NET code, you can write the aggregate function with Visual Studio and paste the code into DataTime. It is important that you do not change the function name and argument, but for the rest, the function can be any code you wish. The return type can also be any valid type (String, Double, Integer,...), including "Object". There are several examples of custom aggregate functions which you can inspect to learn how to write your own aggregate function.

In case you write a custom function, you can also use the same function, if appropriate, for the computation of the total of the custom measure.