Inside CALCULAR: makes the modifier ADD to the group filter instead of replacing it (the group still applies). With a simple condition it changes nothing — it already adds.
| Field | Value |
|---|---|
| Category | Context and filter |
| Type | Aggregation (operates on a set of rows) |
| Arity | 1 argument (fixed) |
| Compiles to SQL (calculated column) | No |
| Version | Formula engine v3. |
Aliases#
Canonical name: MANTER_FILTROS. Accepted aliases (case-insensitive): keepfilters.
Syntax#
MANTER_FILTROS(expr)All arguments are expressions.
Returns#
CALCULAR modifier (does not return a value on its own).
Null handling#
When there is no row in the changed context, it returns blank (never zero) — a blank is more honest than a made-up zero.
Evaluation context#
Modifier — only makes sense INSIDE CALCULAR (or another context function that accepts it). Outside of that, it warns you instead of returning a wrong number.
Differences from DAX#
- DAX equivalent: KEEPFILTERS
- Compatibility: Compatible with DAX
- Note: Makes the modifier ADD to the group filter instead of replacing it.
Examples#
CALCULAR(SOMA(receita); MANTER_FILTROS(ENTRE_DATAS(dia; "2026-01-01"; "2026-03-31")))Example with values#
Input: sum of the loja channel keeping the group.
CALCULAR(SOMA(receita); MANTER_FILTROS(FILTRAR(canal = "loja"))) → 60Expected result: 60
Business example#
Comparative measure — share of total, ranking, change versus another period.
Common errors#
Typos in a column name, an incompatible type, or an invalid argument become a friendly message (pt-BR) — the engine never silently returns a wrong number.