Skip to content

Automatic translation — the Portuguese version is the reference. View in Portuguese

MANTER_FILTROS

On this page (10)

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.

FieldValue
CategoryContext and filter
TypeAggregation (operates on a set of rows)
Arity1 argument (fixed)
Compiles to SQL (calculated column)No
VersionFormula engine v3.

Aliases#

Canonical name: MANTER_FILTROS. Accepted aliases (case-insensitive): keepfilters.

Syntax#

code
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#

code
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.

code
CALCULAR(SOMA(receita); MANTER_FILTROS(FILTRAR(canal = "loja")))  →  60

Expected 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.


← Back to the formula index

Related links