Core Filtering APIs

MemberInfo Objects: For more effective filtering, values can be provided as JSON-style objects containing both the ID and Description (e.g., {id: "value", description: "text"}) rather than simple strings.

setDimensionFilter(dimensionId, values): The primary method for applying filters to a data source. It requires the technical ID of the dimension and an array of selected member IDs.

removeDimensionFilter(dimensionId): Used to clear existing filters from a specific dimension.

getSelectedKey() / getSelectedKeys(): Functions used on input widgets (like dropdowns or checkboxes) to retrieve the user’s current selection before passing it to a filter function.

This example is part of a broader set of SAP Analytics Cloud scripting patterns, covering common use cases such as filtering, measure switching, and reacting to user selections.

Scroll to Top