Custom Measures versus Custom Report Expressions
The decision to use a custom measure versus a custom report expression depends on how you want the data to be computed.
Custom Measures
A custom measure is a new measure you create from fields in the underlying database, using a special formula syntax in the
tab. When you add a custom measure, Designer and Visualizer list it in their Default Subject Areas.For example, a custom measure called Revenue Formula shows total revenue using this formula:
[Quantity]*[Unit Price]
Birst multiplies each unit price with its corresponding quantity and then sums it.
Report Expressions
Custom report expressions are expressions that are presented to the user on-the-fly in a report. They use measures from a subject area. The aggregation is included in the definition of a measure to be used on a report.
For example:
[Sales Date: Sum: Quantity]*[Sales Date: Avg: Unit Price]
Differences Between a Custom Measure and a Report Expression
This example divides the revenue into product categories and the result differs from the custom measure approach:
Category Name | Sales Date:Revenue Formula | Sales Date:Sum:Quantity |
---|---|---|
Fruit | 31,295.48 | 31,262.89 |
Meat | 83,303.36 | 83,078.7 |
Nuts | 45,370.75 | 45,329.71 |
Vegetable | 24,427 | 24,537.05 |
For this example, the first approach would be the most correct; however, the approach you choose may vary based on what you are trying to communicate.