Measures Best Practices (Agents)

The following measures are approved for use with the Pricefx Agents. They follow established best practices applied in the Curated Agents catalog and are implemented using the Query Expressions.

General Guidelines

To ensure reliable and meaningful results, the following rules should be followed when defining measures.

Aggregated Calculations over Pre-filtered Datasets

Measures should be based on aggregated calculations over pre-filtered datasets. For example, filtering by a specific time period should be handled by the Agent configuration, not within the measure itself.

Query Expressions

The following Query Expressions are recommended and considered best practice.

Conditional and Null-handling Functions

Aggregation and Counting Functions

Averages

Averages should not be calculated using the AVG function. Instead, averages should be computed explicitly or as weighted averages. For example, an average price should be calculated as:

Total Revenue / Total Quantity

info This approach ensures that measures accurately reflect business reality and remain consistent across different datasets and use cases.

Measures