Function findFormulaFilter Beta
findFormulaFilter(
measure,match):Filter|undefined
Finds the first filter in a calculated measure formula matching the given target.
Parameters
| Parameter | Type | Description |
|---|---|---|
measure | Readonly< CalculatedMeasure > | The calculated measure to search. |
match | FormulaFilterMatcher | How to target the filter. See FormulaFilterMatcher. |
Returns
Filter | undefined
The matching filter, or undefined when none matches.
Example
Target a filter by attribute, by predicate, or by the filter instance:
findFormulaFilter(revenue, DM.Category.Category);
findFormulaFilter(revenue, (filter) => filter.attribute.expression === '[Category.Category]');