Quarter (1 to 4).
| Field | Value |
|---|---|
| Category | Date and time |
| Type | Scalar (operates value by value) |
| Arity | 1 argument (fixed) |
| Compiles to SQL (calculated column) | Yes |
| Version | Formula engine v3. |
Aliases#
Canonical name: TRIMESTRE. Accepted aliases (case-insensitive): quarter.
Syntax#
code
TRIMESTRE(expr)All arguments are expressions.
Returns#
Number.
Null handling#
Invalid or missing dates become a friendly error or blank, depending on the function.
Evaluation context#
Scalar — evaluated on the result of the arguments (in calculated columns, it runs row by row).
Differences from DAX#
- DAX equivalent: QUARTER
- Compatibility: Compatible with DAX
- Note: Quarter 1–4.
Examples#
code
TRIMESTRE(pedido_em)Example with values#
Input: date 2025-08-10.
code
TRIMESTRE(DATA(2025;8;10)) → 3Expected result: 3
Business example#
Time analysis — order age, accrual month/year, accounting close.
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.