Open main menu

TaticView β

Changes

Expressions/pt-br

1,814 bytes added, 19:09, 22 November 2019
Created page with "<div class="index-right">__TOC__</div>"
Expressões permitem que você crie e edite regras de [[Filters<div class="index-right">__TOC__</pt-br|Filtros]] manualmente usando linguagem de programação. div>
'''Importante''': Depois de editar manualmente a expressão, os operadores regulares não podem ser usados até que você ''Limpe'' todos os filtros;You can create expressions (formulas) directly in the dashboard components. It can thus display calculated values that are not present in the data source file/spreadsheet.
__TOC__To create the expression (formula) in the components, the component must support the addition of the special column ''Expression (Formula)''.
== Estruturas de Expressões Básicas ==In TaticView , all columns in the data file can be used in expressions as long as they are also added to the component that will receive the expression.
=== Operandos de Valor ===In addition, it is also possible to use fixed numbers and texts in the case of comparative expressions.
Os operandos de valor são valores de um [[Column Data Type/pt-br|tipo de dado]] que são usados nas expressões como variáveis.
Expression Example:
=== Operando de Valor ===São valores numéricos do tipo float (domínio dos números Reais). Estes valores permitem o uso de um integer e uma parte fracionada* If the component has the columns ''Total Price'' and ''Quantity'', separada por um ponto (.) (separador decimal)you can create an expression to calculate the ''Unit Price''.Would be like this: ** ''Total Price''Exemplos/ ''Quantity': 1'* In addition, 1.05you can use fixed values, 2.55;such as:** ''Total price'' / 10
==== Operando de Texto ====
São operandos de dados de cadeia literais. Estes valores permitem o uso de campos de sequência de caracteres(strings), sendo delimitados pela aspas simples (').
'''Exemplos''': 'André Moraes', 'São Paulo', 'Espaguete';
==== Operando de Data ====São valores que expressam qualquer dataWe just remember that currently TaticView only supports expressions whose numeric return. É possível representar a data como uma string, sendo delimitada pela aspa simples (') e separado pela barra (/). O formato padrão suportado é "dd/MM/aaaa". '''Exemplos''': '01/01/2011', '29/02/2000';
==== Operando Booleano ====
São valores do tipo ''verdadeiro'' ou ''falso''. Normalmente usados para validar, ou não, uma condição.
'''Exemplos''': true e false;
==== Operandos de Identificação ====São valores que representam um campo ou variável na expressão. Usados para fazer referências para as colunas do arquivo de dados, delimitado por aspas duplas ("). '''Exemplos'''Below are details about how the expressions work: "Cidade.Cidade", "Produto.Produto";
==Basic structure of a Expression (Formula) == Parênteses ====Usados para agrupar e separar partes da expressão. Expressões dentro do parênteses são processadas antes. '''Exemplos''': ("Lucro" / "Preço Total") + 10
==== Operando de variável de sistema ====
São variáveis pré-definidas do sistema. Estes valores são alterados em tempo de execução por valores pré determinados, delimitado por aspas duplas (") e precedido por cerquilha (#). Agora somente uma variável está disponível: "#null", que indica valores ou campos nulos.
==== Value Operand ====
=== Expressões Aritméticas ===It's the numerical values. You can use both while values and decimal values. For decimal values, the decimal separator should be the point.
As relações aritméticas relacionam dois operandos (valor ou outra expressão) para compor a soma* Examples: 1, subtração1.05, multiplicação ou divisão2.55
==== Soma (+) ====
Soma dois operandos. Representado pelo caractere de soma (+).
Sintaxe: ''<operando/expressão> + <operando/expressão>''.
'''Exemplos''': "Impostos" + "Comissões";
==== Subtração (-) Text Operand ====Subtrai dois operandos. Representado pelo caractere de soma ou hífen (-). Sintaxe: ''<operando/expressão> - <operando/expressão>''. '''Exemplos''': "Preço" - "Impostos";
==== Multiplicação (*) ====Multiplica dois operandosIt's the text operands. Representado pelo caractere de multiplicação ou asterisco If you want to use this type of operand in a expression, you must delimit them by the single quotation mark (*'). Sintaxe: ''<operando/expressão> * <operando/expressão>''. '''Exemplos''': "Quantidade" * "Preço Unitário";
==== Divisão (/) ====Divide dois operandos. Representada pelo caractere de divisão ou barra (/). Sintaxe* Examples: 'John Snow'<operando/expressão> / <operando/expressão>, 'California'. , 'Spaghetti''Exemplos''': "Preço" / "Quantidade".
=== Expressões Relacionais = Date Operand ====
As expressões relacionais comparam dois operandos These are values that express any date. To represent a date in expressions the behaviour is similar to text operands, i.e. the content must be surrounded by single quotation marks (valor ou outra expressão) para avaliar se uma condição é ''verdadeira''(true) ou ''falsa''(false). Normalmente usada com funções de decisãoHowever, como the mask ''IFdd/MM/yyyy''must be used.
==== Igual (==) ====Executa a a comparação de igualdade entre dois operandos. Representado pelo operador de igualdade (==). Sintaxe* Examples: '01/01/2019'<expressão> == <expressão>, '14/11/2019'. , '25/12/2019''Exemplos''': "Preço Unitário" == "Preço Total";
==== Diferente (!=) ====
Executa a comparação de diferença entre dois operandos. Representado pelo operador Diferente (!=).
Sintaxe: ''<expressão> != <expressão>''.
'''Exemplos''': "Cidade.Cidade" != 'São Paulo';
==== Maior que (>) Boolean Operand ====Retorna ''true'' (verdadeiro) se a primeira expressão é maior que a segunda expressão e ''false''(falsa) caso contrário. Representado pelo operador maior (>). Sintaxe: ''<expressão> > <expressão>''. '''Exemplos''': "Data de Pedido" > '01/01/2011';
==== Maior ou igual que (>=) ====Retorna 'They're operators of the true'' (verdadeiro) se or false type. Normally user to validate, or not, a primeira expressão é maior ou igual que condition in a segunda expressão e ''false''(falsa) caso contrário. Representado pelo operador maior ou igual (>=). Sintaxe: ''<expressão> >= <expressão>''more complex expression. '''Exemplos''': IF("Data de Pedido" >= '01/01/2011';"Data de Pedido";0);
==== Menor que (<) ====Retorna ''* Examples: true'' (verdadeiro) se a primeira expressão é menor que a segunda expressão e '', false''(falsa) caso contrário. Representado pelo operador menor (<). Sintaxe: ''<expressão> < <expressão>''. '''Exemplos''': "Lucro" < '0';
==== Menor ou igual que (<=) ====
Retorna ''true'' (verdadeiro) se a primeira expressão é menor ou igual que a segunda expressão e ''false''(falsa) caso contrário. Representado pelo operador menor ou igual (<=).
Sintaxe: ''<expressão> <= <expressão>''.
'''Exemplos''': IF("Data de Pedido" <= '01/01/2011';"Data de Pedido";0);
==== Parentheses ====
=== Expressões Lógicas ===Used to group and separate parts of on expression. Expressions within parentheses are processed first.
As expressões lógicas agrupam dois operandos * Example: (booleano ou outra expressão"Profit"/"Total Price") para compor uma expressão lógica, com o objetivo de avaliar a relação de dois operadores booleanos em um resultado ''true''(verdadeiro) ou ''false''(falso). Normalmente usado com funções de decisão, como ''IF'' e com expressões relacionais.+ 10
==== E (&&) System variable Operand ====Executa a operação lógica ''E'' entre dois valores booleanos. Ambos operadores devem ser ''true''(verdadeiro) para que o resultado da operação seja ''true''. Representado pelo operador ''E'' (&&). Sintaxe: ''<expressão> && <expressão>''. '''Exemplos''': IF((Preço > '0') && (Vendedor == 'André Moraes');'Vendido';'Não Vendido'), IF((Cidade!="#null") && (Date<DAY_FROM_TODAY(0));1;0);
==== Ou These are predefined variables in the system. To use the system variables you must precede them by hashtag (||#) ====Executa a operação lógica ''OU'' entre dois valores booleanos. Um dos dois valores deve ser ''true'' para que o resultado da operação seja ''true''. Representado pelo operador ''OU'' and delimit them by double quotes(||"). Sintaxe: ''<expressão> || <expressão>''. '''Exemplos''': IF((Preço > '0') || (Vendido == 'true');'Vendido';'Não Vendido'), IF((Cidade!=Currently only the "#null") || (Date<DAY_FROM_TODAY(0));1;0);variable is available and indicates null content.
==== Não * Example: IF(!) =="Product" ==Executa a operação lógica de negação para um valor booleano. Se o operando for ''true'' o ''NÃO'' converte ela para ''false'' e vice-versa. Representado pelo operador ''NÃO'' ("). Sintaxe: ''! <expressão>''. '''Exemplos''': IF(!BETWEEN("Data#null", '01/01/2013', '31/12/2013');'Não é 2013'0;'É 2013'20).
== Funções Auxiliares Arithmetic Expressions ==
=== Funções Básicas ===Arithmetic expressions relate two operands (which can be any the operands described above, or another expression) to make up the sum, subtraction, multiplication or division.
As funções básicas são funções padrão do sistema e implementam funcionalidades úteis.
==== Abs Sum (+) ====Retorna o valor absoluto de um valor base. Sintaxe: ''ABS(<expression>)''. Aceita um parâmetro e processa dados numéricos. '''Exemplos''': ABC(Lucro-Impostos);
==== Avg ====Retorna a média dos valores de uma sequência de valoresAdd two value operands or another expression result. Sintaxe: Represented by the ''AVG(<expressão1>;<expressão2>[<expressão3>;...;<expressãoN>])+''charecter. Aceita múltiplos parâmetros e processa dados do tipo numérico.Pode ser utilizado para retornar a média de diferentes colunas de uma mesma linha da tabela. '''Exemplos''': AVG(Impostos;Lucro; Custos);
==== Entre (Between) ====Syntax:Verifica se um valor está entre os limites dos valores de parâmetro. Sintaxe: ''BETWEEN(<expressão_para_testar>;<expressão_limite_inicial>; <expressão_limite_finaloperating or expression result>)''. São necessários três parâmetros (de qualquer tipo, mas os três devem ser do mesmo tipo) e retorna um valor booleano, '+'true'' se os valores estão dentro dos limites definidos ou ''false'' se não estão nos limites.<operating or expression result>Example: '''Exemplos"Taxes" + "Commissions"''': BETWEEN("Data";- Sums the values of the fields '01/01/2013';Taxes'31/12/2013'), BETWEEN("Preço";and '0';Commissions'1000.00');
==== Se Não Então (If Then Else) ====
Testa uma expressão booleana e retorna um valor caso seja ''true'' e outro valor case seja ''false''.
Sintaxe: ''IF(<expressão_teste>;<expressão_para_verdadeiro>;<expressão_para_falso>)''. Precisa de três parâmetros, um booleano para testes e retornos de qualquer tipo de dados, desde que ambos sejam do mesmo tipo. Útil para testes de lógica onde duas execuções de expressões diferentes são necessárias.
'''Exemplos''': IF("Filial"=='Sul';'Sul';'Outra Filial')
IF("Lucro"==0;0;Lucro+Impostos);
==== Log Subtraction (-) ====Retorna o logaritmo de um número em uma base definida. Sintaxe: ''LOG(<expressão_de_número>[;<expressão_de_base>])''. Mínimo de um parâmetro e máximo de dois. Se somente um parâmetro é passado, é devolvido o logaritmo neperiano(natural). Se um segundo parâmetro é passado, retorna o logaritmo na base respectiva. '''Exemplos''': LOG(Lucro);
==== Max ====Retorna o maior valor entre dois númerosSubtract two value operands or another expression result. Sintaxe: Represented by the ''MAX(<expressão_de_valor1>;<expressão_de_valor2>)-''charecter. Precisa de dois parâmetros de valor e retorna dados do tipo valor. '''Exemplos''': "Valor"/MAX("Quantidade";"1");
==== Min ====Syntax:Retorna o menor valor entre dois números. Sintaxe: ''MIN(<expressão_de_valor1>; <expressão_de_valor2operating or expression result>)''. Precisa de dois parâmetros de valor e retorna dados do tipo valor. '-''Exemplos' <operating or expression result>Example: ''': "ValorPrice"/MIN(- "QuantidadeTaxes";"1");''' - Subtracts the values ​​from the ''Price'' and ''Taxes'' fields.
==== Potência ====
Retorna a potência de um valor em um expoente definido.
Sintaxe: ''POW(<expressão_de_número>[;<expressão_de_expoente>])''. Mínimo de um parâmetro e máximo de dois. Se o valor do expoente não é dado, usa o valor dois (2) como padrão.
'''Exemplos''': POW(Valor1)+POW(Valor1-Valor2;3);
==== Random Multiplication (*) ====Retorna um número aleatório dentro dos limites dos valores. Sintaxe: ''RANDOM(<expressão_limite_inicial>;<expressão_limite_final>)''. Precisa de dois parâmetros, os limites iniciais e finais do número aleatório a ser gerado. '''Exemplos''': RANDOM(0.0;1.0);
==== Raiz Quadrada (SQRT) ====Retorna a raiz quadrada de um valorMultiplies two value operands or another expression result. Sintaxe: Represented by the multiplication charecter ''SQRT(<expressão>)*''. Precisa de um parâmetro, o valor a ser calculado. '''Exemplos''': SQRT('36').
==== Contém (''LIKE'') ====Syntax:Retorna true se o conteúdo desejado for encontrado na lista e falso se o conteúdo não for encontrado. Sintaxe: ''LIKE( <conjunto_dadosoperating or expression result>;<termo>)''. Precisa de dois parâmetros, o primeiro é o conjunto de dados que será consultado. O segundo é o termo que se deseja encontrar, no conjunto de dados. Lembrando que é necessário utilizar o curinga '*'%'' no termo.<operating or expression result> Example: '''Exemplos''': LIKE("ProdutoQuantity" * "Unit Price";'%gue%'). Retorna verdadeiro se no conjunto de dados ' - Multiplies the value of the ''ProdutoQuantity'' existe algum contendo field by the value of the ''gueUnit Price''. Caso contrário, retorna falsofield.
=== Funções de Data ===
As funções de data são operações que usam como parâmetro e retornam resultados do [[Date==== Division (/pt-br|tipo Data]]) ====
==== Lista de Constantes ====** Divide two value operands or another expression result. Represented by the division charecter ''/'0''': DATE_FIELD_YEAR (Parte do Ano);** '''1''': DATE_FIELD_MONTH (Parte do Mês);** '''2''': DATE_FIELD_DAY (Parte do Dia);** '''3''': DATE_FIELD_FORTNIGHT (Parte da Quinzena);** '''5''': DATE_FIELD_WEEK (Parte da Semana);.
Syntax:
<operating or expression result> '''/''' <operating or expression result>
Example:
'''"Price" / "Quantity"''' - Divides the value of the ''Price'' field by the value of the ''Quantity'' field.
==== Parte da Data ====
Retorna parte de uma data.
Sintaxe: ''DATE_PART(<expressão_de_data>;<constante>)''. Precisa de dois parâmetros, o primeiro é a data de referência e o segundo é uma constante representando a parte desejada da data: 0, 1, 2, 3, 4 ou 5 (veja a lista de constantes acima).
'''Exemplos''': DATE_PART("Data de Pedido";0) - retorna a parte do ano da "Data de Pedido";
==Relational Expressions == Dias a partir de hoje ====Retorna uma contagem de dias para trás (negativa) ou para frente (positiva) contando a partir de hoje. Sintaxe: ''DAY_FROM_TODAY(<expressão_de_número_de_dias>)''. Precisa de um parâmetro, o número de dias para adicionar ou subtrair. '''Exemplos''': DAY_FROM_TODAY(-1) - retorna a data de ontem;
==== Primeiro dia de ====Retorna o primeiro dia de um agrupamento. Esta função possui duas variações:* '''Primeira maneira''': Sintaxe: ''FIRST_DAY_OFRelational expressions compare two operands (<agrupamento_constante>;<expressão_de_data>value/text or other expression)''to assess whether a condition is true or false. Precisa de dois parâmetros, o primeiro é uma constante de agrupamento da qual você quer obter a primeira data: 0, 1, 2Normally used with decision functions, 3 ou 5 (veja lista de constantes) e o segundo é o valor ancora de base. '''Exemplos''': FIRST_DAY_OF(0;DAY_FROM_TODAY(0)) - primeiro dia do ano (0) a partir de hoje; (DAY_FROM_TODAY(0)); FIRST_DAY_OF(1;"Order Date") - primeiro dia do mês (1) baseado na "Ordem do Pedido";* '''Segunda maneira'such as '': Sintaxe: ''FIRST_DAY_OF(<agrupamento_constante>;<modificador_constante_de_data>;<valor_do_modificador_de_data>)IF''. Precisa de três parâmetros, o primeiro é a constante de agrupamento da qual você quer obter a primeira data: 0, 1, 2, 3 ou 5 (veja lista de constantes), a segunda é o modificador da base da data a partir de hoje: 0, 1, 2, 3 ou 5 (veja lista de constantes) e o terceiro é a quantidade para alterar o modificador. '''Exemplos''': FIRST_DAY_OF(1;0;-1) - primeiro dia do mês atual (1) do último ano (0;-1);
==== Último dia de ====
Retorna o último dia de um agrupamento. Esta função possuí duas variações:
* '''Primeira Maneira''':
Sintaxe: ''LAST_DAY_OF(<agrupamento_constante>;<expressão_de_data>)''. Precisa de dois parâmetros, o primeiro é uma constante de agrupamento da qual você quer obter a última data: 0, 1, 2, 3 ou 5 (veja lista de constantes) e o segundo é o valor ancora de base.
'''Exemplos''': LAST_DAY_OF(0;DAY_FROM_TODAY(0)) - último dia do ano (0) a partir de hoje; (DAY_FROM_TODAY(0)); LAST_DAY_OF(1;"Order Date") - último dia do mês (1) baseado na "Ordem do Pedido";
* '''Segunda maneira''':
Sintaxe: ''LAST_DAY_OF(<agrupamento_constante>;<modificador_constante_de_data>;<valor_do_modificador_de_data>)''. Precisa de três parâmetros, o primeiro é a constante de agrupamento da qual você quer obter a última data: 0, 1, 2, 3 ou 5 (veja lista de constantes), a segunda é o modificador da base da data a partir de hoje: 0, 1, 2, 3 ou 5 (veja lista de constantes) e o terceiro é a quantidade para alterar o modificador.
'''Exemplos''': LAST_DAY_OF(1;0;-1) - último dia do mês atual (1) do último ano (0;-1);
==== Nova Data Equality (==) ====Cria um objeto de uma data, mês e ano. Sintaxe: ''NEW_DATE(<expressão_dia>;<expressão_mês>;<expressão_ano>)''. Precisa de três parâmetros, o primeiro é um número de dia válido (1 a 31), o segundo um mês (1 a 12) e o terceiro é um ano. A data é criada do ano para o dia, ou seja, o dia deve ser válido para o mês e para o ano (considerando 29/02, o ano deve ser bissexto). '''Exemplos''': (1;4;DATE_PART("Data de Pedido";0)) - Cria o primeiro dia de abril do ano determinado pela linha atual da coluna "Data de Pedido";
It compares if two operands are the same, returning true if they are the same or false if they are different. Represented by the equality operator ''==== Número de dias ====Retorna o número de dias entre duas datas. Sintaxe: ''NUM_OF_DAYS(<expressão_data1>;<expressão_data2>); Precisa de dois parâmetros do tipo data. '''Exemplos''': NUM_OF_DAYS(FIRST_DAY_OF(0;"Data de Pedido");"Data de Pedido") - retorna o número de dias entre o primeiro dia do ano baseado na coluna "Ordem do Pedido" até o dia atual da coluna "Ordem do Pedido", NUM_OF_DAYS(FIRST_DAY_OF(1;"Pay Date"); LAST_DAY_OF(1;"Pay Date")) - retorna o número de dias do mês para a coluna "Entrega do Pedido";
Syntax: <operating or expression result> '''==== Número de Meses ====Retorna o número de meses entre duas datas. Sintaxe: ''NUM_OF_MONTHS(' <expressão_data1operating or expression result>;<expressão_data2>); Precisa de dois parâmetros do tipo data.Example: '''Exemplos''': NUM_OF_MONTHS(FIRST_DAY_OFIF(0;"DataProduct");== "Data#null";0;20) ''' - Retorna o número de meses entre o primeiro dia do ano da coluna "Data" e o mês atual da coluna "Data";If the ''Product'' is null, return the value ''0''. Otherwise return the value ''20''
==== Data anterior ====
Dado dia e mês, retorna a última ocorrência desta data. Ou seja, se a data atual (hoje) for menor do que a data passada por parâmetro (dia/mês) o retorno será a data (passada por parâmetro) do ano anterior, se não o retorno será a data (passada por parâmetro) do ano atual.
Sintaxe: ''PREVIOUS_DATE(<expressão_dia>;<expressão_mês>)''. Precisa de dois parâmetros, o primeiro é o dia e o segundo é o mês.
'''Exemplos''': PREVIOUS_DATE(15;10) - Considerando que a data de hoje seja ''01/Abril/2017'', se utilizarmos o comando ''PREVIOUS_DATE(15;10)'' a última vez que ''15/Outubro'' ocorreu em relação a data de hoje (''01/Abril/2017'') foi ''15/Outubro/2016''. Logo o retorno será a data ''15/Outubro/2016''.
==== Different (!=) ====
It compare if two operands are different, returning true if they were different or false if equal. Represented by the differente operator ''!==== Varíaveis especiais ====''.
Váriaveis especiais podem ser usadas com as expressõesSyntax: <operating or expression result> '''!=''' <operating or expression result>Example: '''IF("Product" != 'Lasagna';0;20)''' - If the ''Product'' is different from ''Lasagna'', return the value ''0''.Otherwise return the value ''20''
'''Importante:''' as variáveis abaixo devem ser escritas entre aspas duplas.
"@count" - Número total de linhas que foram retornados para o componente. ==== Greater than (>) ====
"@row" - número da linha atualCompares if the first operator (from the left) is greater than the second operator (from the right), returning true if it is greater and false if it is lesser or equal. Represented by the greater operator ''>''.
Syntax: <operating or expression result> '''>''' <operating or expression result>Example: '''IF("@sum[Coluna]Gross Value" > 1000;1;0)''' - Somatório da coluna indicada.If the ''Gross Value'' is greater than ''1000'', returns the value ''1'', if not the value ''0''
"@avg[Coluna]" - Média da coluna semelhante a "@sum[Coluna]" / "@count"
"@prev[coluna]" - Valor da linha anterior dessa coluna.==== Greater or equal to (>=) ====
Compares if the first operator (from the left) is greater or equal to the second operator (from the right), returning true if it is greater or equal and false if it is lesser. Represented by the greater or equal operator ''>=''. Syntax: <operating or expression result> '''>=''' <operating or expression result>Example: '''IF("Gross Value" >= 2500;100;0)''' - If ''Gross Value'' is greater than or equal to ''2500'' returns ''100'', otherwise returns ''0''  ==== Less than (<) ==== Compares if teh first operator (from the left) is lesser than the second operator (from the right), returning true if it is lesser and false if it is greater or equal. Represented by the Lesser operator ''<''. Syntax: <operating or expression result> '''<''' <operating or expression result>Example: '''IF("Gross Value" < 100;50;200)''' - If ''Gross Value'' is less than ''100'', returns ''50'' if not ''200''  ==== Less or equal to (<=) ==== Compares if the first operator (from the left) is lesser or equal to the second operator (from the right), returning true if it is lesser or equal and false if it is greater. Represented by the lesser or equal operator ''<=''. Syntax: <operating or expression result> '''<=''' <operating or expression result>Example: '''IF("Gross Value" <= 500;100;0)''' - If ''Gross Value'' is less than or equal to ''500'' returns ''100'', if not ''0''  == Logical Expressions == Logical expressions group together two operands (Boolean or other expression) to make up a logical expression, in order to evaluate the relationship of two Boolean operators to a true or false result. This type of expression is usually used for decision making, such as IF and with relational expressions.  ==== And Operator (&&) ==== Executes the logical operation ''AND'' between two Boolean values. Both values must return true so that the result of the operation is true. Represented by the ''&&'' operator. Syntax: <expression> && <expression>Examples: '''IF(("Price" > 0) && ("Seller" == 'John Snow');450;0)''' - If ''Price'' is greater than ''0'' '''AND''' ''Seller'' is equal to ''John Snow'', returns ''450'' if not returns ''0'' '''IF(("City" != "#null") && ("Product" != 'Lasagna');1;0)''' - If ''City'' is non-null '''AND''' ''Product'' is different from ''Lasagna'' returns ''1'' if it does not return ''0''  ==== Or Operator (||) ==== Performs the logical ''OR'' operation between two Boolean values. A two values must be true so that the result of the operation is true. Represented by the operator ''||''. Syntax: <expression> || <expression>Examples: '''IF(("Price" > 1000) || ("Profit" >= 50);75;55)''' - If ''Price'' is greater than ''1000'' '''OR''' ''Profit'' is greater than or equal to ''50'' returns ''75'' if not ''55''  '''IF(("City" != "#null") || ("Product" != 'Lasagna');1;0)''' - If ''City'' is non-null '''OR''' ''Product'' is different from ''Lasagna'' returns ''1'' if it does not return ''0''   ==== Denial Operator (!) ==== Performs the logical negation operation for a boolean value. If the result of the operation is true the negation operator converts to false and vice versa. Represented by the operator ''!''. Syntax: !<expression>Example: '''IF(!BETWEEN("Delivery Date"; '01/01/2015'; '31/12/2015');2016;2015)''' - If the ''Delivery Date'' is '''NOT''' between ''01/01/2015'' and ''12/31/2015'' returns ''2016''. If between this period returns ''2015''  == Auxiliary Functions == Basic helper functions are standard system functions and implement useful features for composing complex expressions.  ==== ABS function ==== Function that returns the absolute numeric value of a base numeric value. Syntax: ABS(<value operator or expression>)Example: '''ABS("Price" / "Quantity")''' - Returns the absolute value of ''Price'' divided by ''Quantity''  ==== AVG function ==== Returns the average of the values ​​of a sequence of values. It can be used to return the average of different values ​​of the same row of tables. Syntax: AVG(<expression 1>; <expression 2>; ...)Example: '''AVG("Taxes"; "Profit"; "Cost")''' - Returns the average between the sum of the ''Taxes'', ''Profit'' and ''Cost'' columns  ==== BETWEEN function ==== Checks whether a value is within the limits of the parameters used. Return true or false. Syntax: BETWEEN(<expression to be tested>; <initial limit>; <end limit>)Example: '''BETWEEN("Date Issued"; '01/01/2019'; '31/12/2019')''' - Returns true if ''Date Issued'' is between ''01/01/2019'' and ''12/31/2019''. Otherwise returns false  ==== IF ELSE function (If .... Otherwise ...) ==== Tests a Boolean expression and applies a condition to true or another condition to false. You need three parameters, separated by semicolons (;). The first parameter is the expression to be tested, the second the value to be applied in case of true, and the third to be applied in case of false. Syntax: IF(<expression to be tested>; <expression if true>; <expression if false>)Examples: '''IF(BETWEEN("Value";0;100);10;250)''' - If ''Value'' is between ''0'' and ''100'' returns ''10'', if not ''250''  '''IF("Profit" == 0;0;"Profit" + "Taxes")''' - If ''Profit'' equals ''0'' returns ''0'', if it does not return the sum between ''Profit'' and ''Taxes''  ==== LOG function ==== Returns the logarithm of a number on a defined basis. It can be used with only one parameter, in this case the neperian (natural) logarithm is used . If two parameters are used, the second server to inform the base to be used by the logarithm. Syntax: LOG(<expression>;<base>)Examples: '''LOG("Profit")'''- Returns the logarithm of the field ''Profit''  '''LOG("Price";2)''' - Returns the logarithm of the ''Price'' field in base ''2''  ==== MAX function ==== Returns the largest value between two values. Syntax: MAX(<expression 1>;<expression 2>)Example: '''"Value" / MAX("Quantity";1)''' - Divides ''Value'' by the largest value between ''Quantity'' and ''1''  ==== MIN function ==== Returns the smallest value between two values. Syntax: MIN(<expression 1>; <expression 2>)Example: '''"Value" / MIN("Cost"; 100)''' - Divides ''Value'' by the smallest value between ''Cost'' and ''100''  ==== POWER function ==== Returns the power of a value in a defined exponent. It can be used with only one parameter, in this case it considers the default exponent 2. If a second parameter is passed, this will be the exponent. Syntax: POW(<expression>; <exponent>)Examples: '''POW("Profit")''' - Returns the power of the ''Profit'' value.  '''POW("Cost"; 3)''' - Returns the power of the ''Cost'' value, raised to ''3''  ==== RANDOM function ==== Returns a random number within the range of values ​​passed as arguments. Syntax: RANDOM(<start limit>; <end limit>)Example: '''RANDOM(10,100)''' - Returns a random number between ''10'' and ''100''  ==== SQRT function (Square Root) ==== Returns the square root of a value. Syntax: SQRT(<value or expression>)Examples: '''SQRT("Profit")''' - Returns the square root of the value ''Profit''  '''SQRT(81)''' - Returns the square root of ''81''  ==== LIKE function ==== Returns true if the desired content is found in the list and false otherwise. It needs two parameters, the first is the data to query and the second is the term to be found. Remembering that it is necessary to use the wildcard operator “%” and surround the term by single quotation mark. Syntax: LIKE(< data>; <term>)Example: '''LKE("Product"; '%anh%')''' - Returns true if the ''Product'' contains the term ''anh'' or false otherwise  == Date Functions == Date functions are operations that take a date as a parameter and also return a date. There are some constants to assist in using date functions, they are: * 0: ''DATE_FIELD_YEAR'' (Part of the year)* 1: ''DATE_FIELD_MONTH'' (Month Part)* 2: ''DATE_FIELD_DAY'' (Daypart)* 3: ''DATE_FIELD_FORTNIGHT'' (Part of fortnight)* 5: ''DATE_FIELD_WEEK'' (Part of the Week)  ==== DATE_PART function (Date Part) ==== Returns part of a date. It needs two parameters, the first is the reference date and the second is the constant that represents which part of the date we want to get. Syntax: DATE_ PART(<date>; <constant representing which part>)Example: '''DATE_ PART("Issued Date"; 0)''' - Returns the year portion of the ''Issued Date''  ==== DAY_FROM_TODAY function (Days from today) ==== Returns a days count backward (negative) or forward (positive) from today. You need a parameter that indicates the number of days to add or subtract. Syntax: DAY_FROM_TODAY(<number of days>)Example: '''DAY_FROM_TODAY(-1)''' - Returns yesterday's date  ==== FIRST_DAY_OF function (First day of) ==== Returns the first day of a grouping. This function has two variations: * With two parameters, the first is the grouping constant from which we want to get the first date (see list above), and the second is the base date. Syntax: FIRST_DAY_OF(<date part>; <base date>)Examples: '''FIRST_DAY_OF(0;DAY_FROM_TODAY(0))''' - Returns the first day of the year from today  '''FIRST_DAY_OF(1;"Issue Date")''' - First Day of Month Based on ''Issue Date'' Column * With three parameters, the first is the grouping constant from which we want to get the first date (see list above), the second is the date base modifier from today, and the third is the amount to change the modifier. Syntax: FIRST_DAY_OF(<date part>;<date modifier>;<date modifier value>)Example: '''FIRST_DAY_OF(1,0,-1)''' - first day of current month of last year  ==== LAST_DAY_OF function (Last day of) ==== Returns the last day of a date grouping. This function has two variations. * With two parameters, the first is the grouping constant from which we want the last date (see list above), and the second is the base date. Syntax: LAST_DAY_OF(<date part>; <base date>)Examples: '''LAST_DAY_OF(0;DAY_FROM_TODAY(0))''' - Returns the last day of the year from today.  '''LAST_DAY_OF(1;"Date Issued")''' - Last day of month based on ''Date Issued'' column * With three parameters, the first is the grouping constant from which we want the last date (see list above), the second is the date base modifier from today, and the third is the amount to change the modifier. Syntax: LAST_DAY_OF(<date part>;<date modifier>;<date modifier value>)Example: '''LAST_DAY_OF(1,0,-1)''' - last day of current month of last year  ==== NEW_DATE function (New date) ==== Creates a new date. It needs three parameters, the first corresponds to the day (between 1 and 31), the second month (between 1 and 12) and the third the year. The date is created from year to day, ie the day must be valid for the month and year (considering 29/02, the year must be leap). Syntax: NEW_DATE(<day>;<month>;<year>)Example: '''NEW_DATE(1;4;DATE_PART("Issued Date";0))''' - Creates the first April day of the year determined by the current row in the ''Issued Date'' column.  ==== NUM_OF_DAYS function (Number of days) ==== Returns the number of days between two dates. Therefore you need two dates. Syntax: NUM_OF_DAYS(<date 1>; <date 2>)Examples: '''NUM_OF_DAYS(FIRST_DAY_OF(0;"Issued Date");"Issued Date")''' - Returns the number of days from the first day of the year, based on the ''Issued Date'' column, to the current day, based on the same column.  '''NUM_OF_DAYS(FIRST_DAY_OF(1;"Issued Date");LAST_DAY_OF(1,"Issued Date"))''' - Returns the number of days of the month, based on the ''Issued Date'' column.  ==== NUM_OF_MONTHS function (Number of months) ==== Returns the number of months between two dates. Therefore, two date parameters are required. Syntax: NUM_OF_MONTHS(<date 1>; <date 2>)Example: '''NUM_OF_MONTHS(FIRST_DAY_OF(0; "Date"); "Date")''' - Returns the number of months between the first day of the year and the current month, based on the ''Date'' column.  ==== PREVIOUS_DATE function (Previous date) ==== Given a day and a month, returns the last occurrence of that date. That is, if the current date (today) is less than the date passed by parameter (day / month), the return is the date (passed by parameter) of the previous year. Otherwise the return will be the current year date. Syntax: PREVIOUS_DATE(<day>; <month>)Examples: '''PREVIOUS_DATE(15;12)''' - Considering that today's date is 14/11/2019, the last time December 15th occurred relative to today's date was 15/12/2018, so this will be the return.  == Special Variables == They can be used in conjunction with expressions to create complex calculations. Must be used in double quotation marks (“)  * '''"@count"''' - Total number of rows that were returned for the component.* '''"@row"''' - Current row number* '''"@sum[column]"''' - Sum of the indicated column.** Example: ''"@sum[Price]"'' - returns the sum of all rows in the ''Price'' column.* '''"@avg[column]"''' - Average column, similar to ''"@sum[column]"'' / ''"@count"''* '''"@prev[column]"''' - Row value before current row for this column* '''"@accumCol[colunacolumn]" ''' - Valor acumulado da coluna até a linha corrente. Útil para calcular média variávelCumulative value from column to current row. ExUseful for calculating variable mean.** Example: ''"@accumCol[colunacolumn]" '' / ''"@row"''