Skip to content

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

ingestia BI formula catalog

On this page (8)

Reference for ingestia's analytical language (DAX-style, in Portuguese). There are 102 functions, with names in pt-BR and aliases in English. Each page is generated automatically from the product's function registry — if a function exists in the product, it's here, and vice versa (the docs and the product are kept in sync).

Brazilian syntax#

  • Arguments are separated by ; (semicolon), not by a comma.
  • Decimal comma: 0,33. Thousands separator is a period: 1.234,56.
  • Comparisons: = <> > < >= <=. Text concatenation: &.
  • Variables: VAR nome = expressão; RETORNAR expressão.
  • Dates use the America/Sao_Paulo time zone (HOJE(), AGORA()).

About DAX compatibility#

The language is INSPIRED by DAX and keeps the English names as aliases, but it is NOT DAX. Where the semantics differ, the function's page explicitly marks it with DIFFERS from DAX. In general: aggregations and time intelligence operate on the VISUAL's rows (not on a tabular model with a marked date table), and an empty result is an honest blank, never a made-up zero.

Math (13)#

FunctionWhat it doesAliasesDAX
ABSAbsolute value (no sign).—= DAX
ARREDRounds the number to N decimal places.round= DAX
TETORounds up (integer).ceiling, ceil= DAX
PISORounds down (integer).floor= DAX
POTENCIABase raised to the exponent.power, pow= DAX
RAIZSquare root.sqrt= DAX
EXPe raised to the number.—= DAX
LNNatural logarithm.—= DAX
LOGLogarithm in the given base (default 10).—= DAX
MODRemainder of the division.—= DAX
SINAL-1, 0, or 1 depending on the sign.sign= DAX
INTInteger part (rounds down).—= DAX
TRUNCARCuts off the decimal places (doesn't round).trunc= DAX

Statistics (10)#

FunctionWhat it doesAliasesDAX
SOMASums the column in the group.sum= DAX
MEDIAArithmetic mean of the column.average, avg= DAX
MEDIANAMiddle value (median).median= DAX
MINSmallest value in the column.minimo= DAX
MAXLargest value in the column.maximo= DAX
CONTCounts rows (or non-blank values in the column).count≠ DAX
CONTDCounts distinct values in the column.distinctcount, countd≠ DAX
DESVPADSample standard deviation.stdev, stddev= DAX
VARSample variance.variance≠ DAX
PERCENTILPercentile of the column (p between 0 and 1).percentile= DAX

Logic (8)#

FunctionWhat it doesAliasesDAX
SESE(condition; then; else?) — without the 'else' the result is blank.if= DAX
ETrue when ALL conditions hold.and≠ DAX
OUTrue when ANY condition holds.or≠ DAX
NAONegates the condition.not= DAX
SEERROReturns the fallback when the calculation errors (or comes out blank).iferror≠ DAX
ESCOLHERESCOLHER(value; case1; res1; ...; default?) — also accepts the name CASO.switch, caso= DAX
COALESCE1st non-blank value in the list.primeiro= DAX
EHVAZIO1 when the value is blank.isblank= DAX

Text (13)#

FunctionWhat it doesAliasesDAX
CONCATENARJoins texts.concatenate, concat≠ DAX
ESQUERDAFirst N characters.left= DAX
DIREITALast N characters.right= DAX
EXTTEXTOPart of the text starting at the position (1 = 1st character).mid, substr= DAX
NUMCARACTNumber of characters.len, length= DAX
MAIUSCULAAll uppercase.upper= DAX
MINUSCULAAll lowercase.lower= DAX
ARRUMARRemoves extra spaces.trim= DAX
SUBSTITUIRReplaces all occurrences of a substring.substitute, replace≠ DAX
LOCALIZARPosition of the substring within the text (0 = not found).search, find≠ DAX
TEXTONumber → text (pt-BR format).format≠ DAX
VALORText → number (accepts 1.234,56).value= DAX
SEQUENCIASeries of numbers as TEXT (from; to; step?; separator?) — for card labels, legends, and subtitles.generateseries, serie≠ DAX

Date and time (32)#

FunctionWhat it doesAliasesDAX
HOJEToday's date.today≠ DAX
AGORACurrent date and time.now≠ DAX
ANOYear of the date.year= DAX
MESMonth of the date (1 to 12).month= DAX
DIADay of the month.day= DAX
TRIMESTREQuarter (1 to 4).quarter= DAX
SEMANAWeek number in the year (the week starts on Sunday).weeknum, week= DAX
DIASEMANADay of the week (1 = Sunday … 7 = Saturday).weekday, dayofweek= DAX
DATADIFDifference between two dates in the chosen unit.datediff≠ DAX
FIMMESLast day of the month, N months ahead.eomonth= DAX
EDATESame date N months ahead (or back).datames= DAX
DATABuilds the date from year; month; day.date= DAX
ACUM_ANOYear-to-date up to the current point (restarts at the beginning of the year of the model's calendar — January in the calendar year, April in an Apr–Mar fiscal year).totalytd, ytd≠ DAX
ACUM_TRIQuarter-to-date up to the current point.totalqtd, qtd≠ DAX
ACUM_MESMonth-to-date up to the current point.totalmtd, mtd≠ DAX
MESMO_PERIODO_ANO_ANTERIORThe same date range, one year earlier.sameperiodlastyear, spla≠ DAX
DESLOCAR_PERIODOThe same measure N periods before/after (unit: d, m, or a).dateadd≠ DAX
MES_ANTERIORThe measure over the ENTIRE PREVIOUS MONTH (not the group's range shifted).previousmonth≠ DAX
ANO_ANTERIORThe measure over the ENTIRE PREVIOUS YEAR (January 1 to December 31).previousyear≠ DAX
TRIMESTRE_ANTERIORThe measure over the ENTIRE PREVIOUS QUARTER.previousquarter≠ DAX
PROXIMO_MESThe measure over the ENTIRE NEXT MONTH (useful for targets and forecasts already entered).nextmonth≠ DAX
PROXIMO_ANOThe measure over the ENTIRE NEXT YEAR.nextyear≠ DAX
PERIODO_PARALELOThe measure N periods back/ahead, always over the ENTIRE period (it's MES_ANTERIOR with the N you choose).parallelperiod≠ DAX
DATAS_NO_PERIODOInside CALCULAR: a window of N periods from the given date (negative N goes back in time). It's the moving total — 3 months, 12 months, 7 days.datesinperiod≠ DAX
SALDO_FINALThe value on the LAST day WITH AN ENTRY in the period (not the sum). Period: "GRUPO" (default), "MES", "TRI", or "ANO".closingbalance≠ DAX
SALDO_INICIALThe value on the FIRST day WITH AN ENTRY in the period (not the sum). Period: "GRUPO" (default), "MES", "TRI", or "ANO".openingbalance≠ DAX
PRIMEIRA_DATAThe earliest date in the current group.firstdate≠ DAX
ULTIMA_DATAThe latest date in the current group.lastdate≠ DAX
INICIO_MES1st day of the month (period, in the fiscal/4-4-5 calendar) of the current group.startofmonth≠ DAX
FIM_MESLast day of the month (period, in the fiscal/4-4-5 calendar) of the current group.endofmonth≠ DAX
INICIO_ANO1st day of the year (fiscal, when configured) of the current group.startofyear≠ DAX
FIM_ANOLast day of the year (fiscal, when configured) of the current group.endofyear≠ DAX

Context and filter (26)#

FunctionWhat it doesAliasesDAX
DIVIDIRError-free division: returns the fallback when the divisor is zero.divide= DAX
PCT_TOTALThe group's share of the visual's total (0 to 1).pcttotalno eq.
ACUMULADORunning sum up to the current point on the axis.runningno eq.
SUMTOTALGrand total of the column across the whole visual.—no eq.
TUDOInside CALCULAR: ignores the group filter and uses the whole visual.all≠ DAX
FILTRARInside CALCULAR: keeps only the rows where the condition is true.filter≠ DAX
TUDO_EXCETOInside CALCULAR: ignores the group filter BUT keeps the given column(s).allexcept= DAX
REMOVER_FILTROSInside CALCULAR: clears the group filter ONLY on the given column(s) and keeps the rest (it's the opposite of TUDO_EXCETO).removefilters= DAX
MANTER_FILTROSInside 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.keepfilters= DAX
TRATAR_COMOInside CALCULAR: uses the values the 2nd column has IN THE CURRENT GROUP as a filter on the 1st — links two columns with no declared relationship. Accepts up to 3 pairs.treatas≠ DAX
ENTRE_DATASInside CALCULAR: replaces the date filter with the given range (ignores the group's period).datesbetween= DAX
CALCULAREvaluates the expression with a changed filter: TUDO() ignores the group, FILTRAR() narrows it.calculate≠ DAX
PRIMEIROS_NInside CALCULAR: keeps only the top N rows by the expression — or the top N groups, if you provide the column. A tie at the boundary is included in full (may exceed N).topn= DAX
CLASSIFICARPosition of the current group among all the visual's groups by the measure (1 = highest). Ties share the same position.rankx, ranquear= DAX
PROCVValue of a column in the row where the lookup matches (searches the whole visual). Accepts several lookup columns and a default at the end.lookupvalue, procurar= DAX
VALOR_SELECIONADOThe column's value when the group has only one; otherwise the given default.selectedvalue= DAX
TEM_UM_VALOR1 when the column has a single value in the current group.hasonevalue= DAX
ESTA_FILTRADO1 when the column is narrowed in the group (it has fewer values than in the whole visual).isfiltered≠ DAX
SOMAXEvaluates the expression for each row and SUMS the results. Accepts a FILTRAR(...) table as the 1st argument.sumx≠ DAX
MEDIAXEvaluates the expression for each row and takes the AVERAGE. Accepts a FILTRAR(...) table as the 1st argument.averagex≠ DAX
MINXSmallest result of the expression across the rows. Accepts a FILTRAR(...) table as the 1st argument.—≠ DAX
MAXXLargest result of the expression across the rows. Accepts a FILTRAR(...) table as the 1st argument.—≠ DAX
CONTXHow many rows where the expression yields a value (non-blank). Accepts a FILTRAR(...) table as the 1st argument.countx≠ DAX
JUNTARXJoins the expression's result for each row into a single text. Accepts a FILTRAR(...) table as the 1st argument.concatenatex≠ DAX
CAMINHOPath from the root to the item in the parent-child hierarchy, separated by "" (e.g., "33.1
ITEM_CAMINHOLevel N of the path (1 = root). With "FIM" as the 3rd argument it counts backward (1 = the item itself).pathitem= DAX

Reference generated automatically from the product's function registry and kept in sync with the formula engine.

Related links