sisense.com
✅ You are viewing documentation for the latest version of Compose SDK.
Version:

Function withAddedFormulaFilter Beta

withAddedFormulaFilter(filter): CalculatedMeasureTransformer

Returns a transformer that adds a filter to a calculated measure formula, scoping the whole formula by it.

Always appends the filter as a measured-value argument and references it from the expression — it does not replace an existing filter on the same attribute. Use withFormulaFilterFor for upsert semantics.

Parameters

ParameterTypeDescription
filterFilterThe filter to add.

Returns

CalculatedMeasureTransformer

A transformer producing the updated calculated measure.

Example

Scope the whole formula by an additional filter (appended as a measured-value argument):

const highValue = withAddedFormulaFilter(
  filterFactory.greaterThan(DM.Commerce.Revenue, 1000),
)(revenue);
Last Updated: