<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Acumulado com Expressão in Brasil</title>
    <link>https://community.qlik.com/t5/Brasil/Acumulado-com-Express%C3%A3o/m-p/1472433#M54286</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;Fala pessoal! Tudo beleza?&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Certamente vocês já fizeram algum relatório de Contabilidade e foi solicitado um indicador que possui os valores acumulados mês a mês, seja de Saldo, Lucro, etc.&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Sabemos que a maioria dos gráficos possuem a função de acumular na aba de expressões, mas nem sempre esse acumulado vai atender a nossa demanda.&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;&amp;nbsp; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Gráficos que &lt;SPAN style="text-decoration: underline;"&gt;possuem&lt;/SPAN&gt; a função de acumular: Barra, Linha, Combinado, Radar, Mekko, Dispersão, Grade e Table Simples.&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Gráficos que &lt;SPAN style="text-decoration: underline;"&gt;não possuem&lt;/SPAN&gt; a função de acumular: Mostrador, Tabela Dinâmica, Pizza, Funil e Blocos.&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;&amp;nbsp;&amp;nbsp; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Imagine um cenário em que temos: um gráfico de tabela simples com o valor de REALIZADO e o valor de META. Precisamos agora criar mais três colunas: Realizado Acumulado, Meta Acumulada e % de Realizado em relação a meta.&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Tranquilo! Gráfico de tabela simples possui a função de acumular a expressão por padrão.&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;&amp;nbsp; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Primeira expressão: Realizado Acumulado!&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;SUM(VALOR)&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Marco Acumular, já era uma. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/grin.png" /&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;&amp;nbsp; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Segunda expressão: Meta Acumulada!&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;SUM(META)&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Marco Acumular, já era duas!&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;&amp;nbsp; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Terceira expressão: %!&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Vou apenas reaproveitar as expressões...&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;&amp;nbsp; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;[Realizado Acum.]/[Meta Acum.]&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Pronto! Terminei!&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;&amp;nbsp;&amp;nbsp; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Apenas verifico os valores só para ter certeza que não fiz nada errado&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;&amp;nbsp;&amp;nbsp; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Jan/2015&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Realizado Acum = 100&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Meta Acum =&amp;nbsp; 110&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Percentual = 100/110 = 90,91%&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Qlikview = 90,91% BOA!&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&amp;nbsp;&amp;nbsp; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Fev/2015&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Realizado Acum = 220&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Meta Acum =&amp;nbsp; 240&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Percentual = 220/240= 91,66%&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Qlikview = 92,31% UÉ!&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;&amp;nbsp; &lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;Bom, acho que preciso marcar o acumulado na expressão do percentual também!&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Qlikview = 183,22%&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;&lt;STRONG style="text-decoration: underline;"&gt;NÃO É POSSÍVEL!&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;&amp;nbsp; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Deve ser algum erro de casa decimal (RSRSRS Eu sempre penso isso kkk!!!)&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Refaço as contas e realmente não é erro de casa decimal.&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Removo o acumulado das expressões: Realizado Acum e Meta Acum, e refaço o cálculo do percentual&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;&amp;nbsp; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Fev/2015&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Realizado Acum = 120&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Meta Acum =&amp;nbsp; 130&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Percentual = 120/130= 92,31%&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;&amp;nbsp; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Não acredito, o qlikview não consegue reutilizar a expressão com o acumulado. Afff! E agora?&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;&amp;nbsp; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Bom! Teremos então que investigar algumas funções que possam obter o mesmo resultado do acumulado do QlikView.&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H1 style="color: #111111; font-family: Merriweather, Georgia, Times, serif; font-size: 1.6em; margin: 0 0 0.8125em;"&gt;Funções&lt;/H1&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;Hoje trabalharemos com as funções Funções Inter-Registro de Gráficos, são elas:&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;&lt;STRONG style="font-style: inherit;"&gt;Above()&lt;/STRONG&gt; = &lt;SPAN style="text-decoration: underline;"&gt;Acima&lt;/SPAN&gt; - Retorna o valor da expressão avaliada com os valores de dimensão do gráfico da forma como aparecem na linha acima da atual em um segmento de coluna de uma tabela.&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;&lt;STRONG style="font-style: inherit;"&gt;Below()&lt;/STRONG&gt; = &lt;SPAN style="text-decoration: underline;"&gt;Abaixo&lt;/SPAN&gt; - Retorna o valor da expressão avaliado com os valores de dimensão do gráfico que aparecem na linha abaixo da atual dentro de um segmento de coluna em uma tabela.&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;&lt;STRONG style="font-style: inherit;"&gt;Before()&lt;/STRONG&gt; = &lt;SPAN style="text-decoration: underline;"&gt;Antes&lt;/SPAN&gt; - Retorna o valor da expressão avaliada com os valores de dimensão de uma tabela dinâmica como aparecerem na coluna antes da atual.&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;&lt;STRONG style="font-style: inherit;"&gt;After()&lt;/STRONG&gt; = &lt;SPAN style="text-decoration: underline;"&gt;Depois&lt;/SPAN&gt; - Retorna o valor da expressão avaliada com os valores de dimensão de uma tabela dinâmica como aparecerem na coluna depois da atual.&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;/P&gt;&lt;H2 style="color: #111111; font-family: Merriweather, Georgia, Times, serif; font-weight: inherit; font-size: 1.4em; margin: 0 0 0.8125em;"&gt;Características das funções&lt;/H2&gt;&lt;UL&gt;&lt;LI&gt;Na primeira coluna de um segmento de linha, um valor NULL será retornado, já que não há uma coluna&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;antes dela.&lt;/LI&gt;&lt;LI&gt;Se a tabela for unidimensional ou se a expressão for precedida pelo qualificador total, o segmento de linha&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;atual será sempre igual à linha inteira.&lt;/LI&gt;&lt;LI&gt;Especificar um deslocamento maior que 1 permite que você transfira a avaliação da expressão para essa outra coluna, por exemplo: Se usar para a função Before, então estará avaliando colunas a esquerda em relação a atual coluna.&lt;/LI&gt;&lt;LI&gt;Um número de deslocamento negativo tornará a função o seu inverso, por exemplo a função before ficará equivalente a função after.&lt;/LI&gt;&lt;LI&gt;A especificação de um deslocamento igual a 0 avaliará a expressão da coluna atual.&lt;/LI&gt;&lt;LI&gt;Ao especificar um terceiro parâmetro n maior que 1, a função retornará não um, mas uma série de valores n,&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;um para cada n colunas da tabela. &lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG style="font-style: inherit;"&gt;Dessa forma, a função pode ser usada como um argumento para qualquer uma das Funções de Intervalo de Gráfico especiais.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&amp;nbsp; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;A parte acima grifada é muito importante, pois como queremos trabalhar com valores acumulados, então teremos que pegar o valor da linha/coluna atual e somar com o de linha(s)/coluna(s) anterior(es) e isso nos obriga a utilizar essas funções de intervalo de gráfico especiais.&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;&amp;nbsp; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Essas funções são precedidas da palavra Range, então temos: RangeSum, RangeAvg, RangeCount, RangeMin, RangeMax.... por aí vai.&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;&amp;nbsp; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;IMPORTANTE: Essas funções de Range servirão para somar os resultados das funções Inter-Registros. Lembre-se que essas funções Inter-Registros retornaram vários resultados e é por isso que teremos que utilizar as funções de Range. Se tentássemos utilizar somente um SUM, o Qlikview retornaria nulo.&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;H1 style="color: #111111; font-family: Merriweather, Georgia, Times, serif; font-size: 1.6em; margin: 0 0 0.8125em;"&gt;&lt;/H1&gt;&lt;H1 style="color: #111111; font-family: Merriweather, Georgia, Times, serif; font-size: 1.6em; margin: 0 0 0.8125em;"&gt;Exemplo&lt;/H1&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;No exemplo em que vou comentar, estarei utilizando um gráfico de tabela simples com a dimensão MêsAno e suas respectivas expressões.&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Se estamos trabalhando com um gráfico de tabela simples, então utilizaremos a função Inter-Registro Above(), pois o resultado do mês anterior esta na linha acima, desde que o gráfico esteja ordenado de forma Crescente.&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Lembrando: Queremos acumular desde o primeiro MêsAno disponível nos filtros.&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;&amp;nbsp; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Expressão de Realizado: RangeSum(Above(SUM(VALOR), 0, RowNo()))&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Vamos entender os parâmetros do Above&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Deslocamento é zero, ou seja, estou avaliando a expressão da linha atual&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;N = RowNo() [RowNo() retorna o número da linha do gráfico]&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Se estamos na primeira linha do gráfico, então a expressão estará da seguinte forma: RangeSum(Above(SUM(VALOR), 0, 1)), ou seja, estamos analisando somente a linha atual. Para a expressão RangeSum estamos somando o intervalo da linha atual até a linha atual.&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Se estamos na segunda linha do gráfico, então a expressão estará da seguinte forma: RangeSum(Above(SUM(VALOR), 0, 2)), ou seja, estamos analisando a linha atual&amp;nbsp; e a linha anterior. Para a expressão RangeSum estamos somando o intervalo da linha atual até a linha anterior.&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Se estamos na terceira linha do gráfico, então a expressão estará da seguinte forma: RangeSum(Above(SUM(VALOR), 0, 3)), ou seja, estamos analisando a linha atual&amp;nbsp; e duas linhas anteriores. Para a expressão RangeSum estamos somando o intervalo da linha atual até duas linhas anteriores.&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;&amp;nbsp; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Expressão de Meta: RangeSum(Above(SUM(META), 0, RowNo()))&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;A regra se mantém a mesma para a meta.&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Agora o percentual fica fácil:&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;RangeSum(Above(SUM(VALOR), 0, RowNo())) / RangeSum(Above(SUM(META), 0, RowNo()))&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Agora teremos o seguinte resultado&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;&amp;nbsp; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;&lt;A href="https://ynicolett.files.wordpress.com/2015/05/grafico01.jpg" style="color: #1b8be0; font-style: inherit; font-weight: inherit;"&gt;&lt;IMG alt="Grafico01" class="wp-image-166 alignnone jive-image size-medium" height="91" src="https://ynicolett.files.wordpress.com/2015/05/grafico01.jpg?w=300" style="color: #222222; font-style: inherit; font-weight: inherit; border-color: #dddddd; padding: 6px; margin-top: 0.4em;" width="300" /&gt;&lt;/A&gt;&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;&amp;nbsp; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Muito bom!&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;/P&gt;&lt;H1 style="color: #111111; font-family: Merriweather, Georgia, Times, serif; font-size: 1.6em; margin: 0 0 0.8125em;"&gt;Fique Atento&lt;/H1&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;Lembre-se de escolher corretamente a expressão Inter-Registro a ser utilizada, se estiver em uma tabela dinâmica, com o MêsAno pivoteado, então temos que pegar o resultado da COLUNA ANTERIOR, para isso devemos utilizar a função Before().&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Abaixo disponibilizei uma aplicação com um exemplo na tabela dinâmica e como acumular somente alguns passos, por exemplo: Somente 1 mês anterior ou somente dois meses anteriores.&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;&lt;A href="https://drive.google.com/file/d/0B2cPTU8EF4R4VmthWGViZmlEdGs/view?usp=sharing" style="color: #1b8be0; font-style: inherit; font-weight: inherit;" target="_blank" title="Aplicação de Exemplo"&gt;Para fazer download da aplicação de exemplo clique aqui!&lt;/A&gt;&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;/P&gt;&lt;H1 style="color: #111111; font-family: Merriweather, Georgia, Times, serif; font-size: 1.6em; margin: 0 0 0.8125em;"&gt;Conclusão&lt;/H1&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;Se o que você deseja fazer o QlikView oferece, então utilize! Sempre as funções prontas do QlikView oferecem melhor performance, mas nem tudo o QlikView nos oferece de "mão beijada", desta forma é bom estarmos preparados para essas ocasiões.&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Até a próxima semana!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 31 May 2015 23:17:00 GMT</pubDate>
    <dc:creator>nicolett_yuri</dc:creator>
    <dc:date>2015-05-31T23:17:00Z</dc:date>
    <item>
      <title>Acumulado com Expressão</title>
      <link>https://community.qlik.com/t5/Brasil/Acumulado-com-Express%C3%A3o/m-p/1472433#M54286</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;Fala pessoal! Tudo beleza?&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Certamente vocês já fizeram algum relatório de Contabilidade e foi solicitado um indicador que possui os valores acumulados mês a mês, seja de Saldo, Lucro, etc.&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Sabemos que a maioria dos gráficos possuem a função de acumular na aba de expressões, mas nem sempre esse acumulado vai atender a nossa demanda.&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;&amp;nbsp; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Gráficos que &lt;SPAN style="text-decoration: underline;"&gt;possuem&lt;/SPAN&gt; a função de acumular: Barra, Linha, Combinado, Radar, Mekko, Dispersão, Grade e Table Simples.&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Gráficos que &lt;SPAN style="text-decoration: underline;"&gt;não possuem&lt;/SPAN&gt; a função de acumular: Mostrador, Tabela Dinâmica, Pizza, Funil e Blocos.&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;&amp;nbsp;&amp;nbsp; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Imagine um cenário em que temos: um gráfico de tabela simples com o valor de REALIZADO e o valor de META. Precisamos agora criar mais três colunas: Realizado Acumulado, Meta Acumulada e % de Realizado em relação a meta.&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Tranquilo! Gráfico de tabela simples possui a função de acumular a expressão por padrão.&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;&amp;nbsp; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Primeira expressão: Realizado Acumulado!&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;SUM(VALOR)&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Marco Acumular, já era uma. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/grin.png" /&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;&amp;nbsp; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Segunda expressão: Meta Acumulada!&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;SUM(META)&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Marco Acumular, já era duas!&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;&amp;nbsp; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Terceira expressão: %!&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Vou apenas reaproveitar as expressões...&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;&amp;nbsp; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;[Realizado Acum.]/[Meta Acum.]&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Pronto! Terminei!&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;&amp;nbsp;&amp;nbsp; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Apenas verifico os valores só para ter certeza que não fiz nada errado&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;&amp;nbsp;&amp;nbsp; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Jan/2015&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Realizado Acum = 100&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Meta Acum =&amp;nbsp; 110&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Percentual = 100/110 = 90,91%&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Qlikview = 90,91% BOA!&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&amp;nbsp;&amp;nbsp; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Fev/2015&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Realizado Acum = 220&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Meta Acum =&amp;nbsp; 240&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Percentual = 220/240= 91,66%&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Qlikview = 92,31% UÉ!&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;&amp;nbsp; &lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;Bom, acho que preciso marcar o acumulado na expressão do percentual também!&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Qlikview = 183,22%&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;&lt;STRONG style="text-decoration: underline;"&gt;NÃO É POSSÍVEL!&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;&amp;nbsp; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Deve ser algum erro de casa decimal (RSRSRS Eu sempre penso isso kkk!!!)&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Refaço as contas e realmente não é erro de casa decimal.&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Removo o acumulado das expressões: Realizado Acum e Meta Acum, e refaço o cálculo do percentual&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;&amp;nbsp; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Fev/2015&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Realizado Acum = 120&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Meta Acum =&amp;nbsp; 130&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Percentual = 120/130= 92,31%&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;&amp;nbsp; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Não acredito, o qlikview não consegue reutilizar a expressão com o acumulado. Afff! E agora?&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;&amp;nbsp; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Bom! Teremos então que investigar algumas funções que possam obter o mesmo resultado do acumulado do QlikView.&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H1 style="color: #111111; font-family: Merriweather, Georgia, Times, serif; font-size: 1.6em; margin: 0 0 0.8125em;"&gt;Funções&lt;/H1&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;Hoje trabalharemos com as funções Funções Inter-Registro de Gráficos, são elas:&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;&lt;STRONG style="font-style: inherit;"&gt;Above()&lt;/STRONG&gt; = &lt;SPAN style="text-decoration: underline;"&gt;Acima&lt;/SPAN&gt; - Retorna o valor da expressão avaliada com os valores de dimensão do gráfico da forma como aparecem na linha acima da atual em um segmento de coluna de uma tabela.&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;&lt;STRONG style="font-style: inherit;"&gt;Below()&lt;/STRONG&gt; = &lt;SPAN style="text-decoration: underline;"&gt;Abaixo&lt;/SPAN&gt; - Retorna o valor da expressão avaliado com os valores de dimensão do gráfico que aparecem na linha abaixo da atual dentro de um segmento de coluna em uma tabela.&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;&lt;STRONG style="font-style: inherit;"&gt;Before()&lt;/STRONG&gt; = &lt;SPAN style="text-decoration: underline;"&gt;Antes&lt;/SPAN&gt; - Retorna o valor da expressão avaliada com os valores de dimensão de uma tabela dinâmica como aparecerem na coluna antes da atual.&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;&lt;STRONG style="font-style: inherit;"&gt;After()&lt;/STRONG&gt; = &lt;SPAN style="text-decoration: underline;"&gt;Depois&lt;/SPAN&gt; - Retorna o valor da expressão avaliada com os valores de dimensão de uma tabela dinâmica como aparecerem na coluna depois da atual.&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;/P&gt;&lt;H2 style="color: #111111; font-family: Merriweather, Georgia, Times, serif; font-weight: inherit; font-size: 1.4em; margin: 0 0 0.8125em;"&gt;Características das funções&lt;/H2&gt;&lt;UL&gt;&lt;LI&gt;Na primeira coluna de um segmento de linha, um valor NULL será retornado, já que não há uma coluna&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;antes dela.&lt;/LI&gt;&lt;LI&gt;Se a tabela for unidimensional ou se a expressão for precedida pelo qualificador total, o segmento de linha&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;atual será sempre igual à linha inteira.&lt;/LI&gt;&lt;LI&gt;Especificar um deslocamento maior que 1 permite que você transfira a avaliação da expressão para essa outra coluna, por exemplo: Se usar para a função Before, então estará avaliando colunas a esquerda em relação a atual coluna.&lt;/LI&gt;&lt;LI&gt;Um número de deslocamento negativo tornará a função o seu inverso, por exemplo a função before ficará equivalente a função after.&lt;/LI&gt;&lt;LI&gt;A especificação de um deslocamento igual a 0 avaliará a expressão da coluna atual.&lt;/LI&gt;&lt;LI&gt;Ao especificar um terceiro parâmetro n maior que 1, a função retornará não um, mas uma série de valores n,&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;um para cada n colunas da tabela. &lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG style="font-style: inherit;"&gt;Dessa forma, a função pode ser usada como um argumento para qualquer uma das Funções de Intervalo de Gráfico especiais.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&amp;nbsp; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;A parte acima grifada é muito importante, pois como queremos trabalhar com valores acumulados, então teremos que pegar o valor da linha/coluna atual e somar com o de linha(s)/coluna(s) anterior(es) e isso nos obriga a utilizar essas funções de intervalo de gráfico especiais.&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;&amp;nbsp; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Essas funções são precedidas da palavra Range, então temos: RangeSum, RangeAvg, RangeCount, RangeMin, RangeMax.... por aí vai.&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;&amp;nbsp; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;IMPORTANTE: Essas funções de Range servirão para somar os resultados das funções Inter-Registros. Lembre-se que essas funções Inter-Registros retornaram vários resultados e é por isso que teremos que utilizar as funções de Range. Se tentássemos utilizar somente um SUM, o Qlikview retornaria nulo.&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;H1 style="color: #111111; font-family: Merriweather, Georgia, Times, serif; font-size: 1.6em; margin: 0 0 0.8125em;"&gt;&lt;/H1&gt;&lt;H1 style="color: #111111; font-family: Merriweather, Georgia, Times, serif; font-size: 1.6em; margin: 0 0 0.8125em;"&gt;Exemplo&lt;/H1&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;No exemplo em que vou comentar, estarei utilizando um gráfico de tabela simples com a dimensão MêsAno e suas respectivas expressões.&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Se estamos trabalhando com um gráfico de tabela simples, então utilizaremos a função Inter-Registro Above(), pois o resultado do mês anterior esta na linha acima, desde que o gráfico esteja ordenado de forma Crescente.&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Lembrando: Queremos acumular desde o primeiro MêsAno disponível nos filtros.&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;&amp;nbsp; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Expressão de Realizado: RangeSum(Above(SUM(VALOR), 0, RowNo()))&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Vamos entender os parâmetros do Above&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Deslocamento é zero, ou seja, estou avaliando a expressão da linha atual&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;N = RowNo() [RowNo() retorna o número da linha do gráfico]&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Se estamos na primeira linha do gráfico, então a expressão estará da seguinte forma: RangeSum(Above(SUM(VALOR), 0, 1)), ou seja, estamos analisando somente a linha atual. Para a expressão RangeSum estamos somando o intervalo da linha atual até a linha atual.&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Se estamos na segunda linha do gráfico, então a expressão estará da seguinte forma: RangeSum(Above(SUM(VALOR), 0, 2)), ou seja, estamos analisando a linha atual&amp;nbsp; e a linha anterior. Para a expressão RangeSum estamos somando o intervalo da linha atual até a linha anterior.&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Se estamos na terceira linha do gráfico, então a expressão estará da seguinte forma: RangeSum(Above(SUM(VALOR), 0, 3)), ou seja, estamos analisando a linha atual&amp;nbsp; e duas linhas anteriores. Para a expressão RangeSum estamos somando o intervalo da linha atual até duas linhas anteriores.&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;&amp;nbsp; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Expressão de Meta: RangeSum(Above(SUM(META), 0, RowNo()))&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;A regra se mantém a mesma para a meta.&lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Agora o percentual fica fácil:&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;RangeSum(Above(SUM(VALOR), 0, RowNo())) / RangeSum(Above(SUM(META), 0, RowNo()))&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Agora teremos o seguinte resultado&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;&amp;nbsp; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;&lt;A href="https://ynicolett.files.wordpress.com/2015/05/grafico01.jpg" style="color: #1b8be0; font-style: inherit; font-weight: inherit;"&gt;&lt;IMG alt="Grafico01" class="wp-image-166 alignnone jive-image size-medium" height="91" src="https://ynicolett.files.wordpress.com/2015/05/grafico01.jpg?w=300" style="color: #222222; font-style: inherit; font-weight: inherit; border-color: #dddddd; padding: 6px; margin-top: 0.4em;" width="300" /&gt;&lt;/A&gt;&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;&amp;nbsp; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Muito bom!&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;/P&gt;&lt;H1 style="color: #111111; font-family: Merriweather, Georgia, Times, serif; font-size: 1.6em; margin: 0 0 0.8125em;"&gt;Fique Atento&lt;/H1&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;Lembre-se de escolher corretamente a expressão Inter-Registro a ser utilizada, se estiver em uma tabela dinâmica, com o MêsAno pivoteado, então temos que pegar o resultado da COLUNA ANTERIOR, para isso devemos utilizar a função Before().&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Abaixo disponibilizei uma aplicação com um exemplo na tabela dinâmica e como acumular somente alguns passos, por exemplo: Somente 1 mês anterior ou somente dois meses anteriores.&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;&lt;A href="https://drive.google.com/file/d/0B2cPTU8EF4R4VmthWGViZmlEdGs/view?usp=sharing" style="color: #1b8be0; font-style: inherit; font-weight: inherit;" target="_blank" title="Aplicação de Exemplo"&gt;Para fazer download da aplicação de exemplo clique aqui!&lt;/A&gt;&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;&lt;/P&gt;&lt;H1 style="color: #111111; font-family: Merriweather, Georgia, Times, serif; font-size: 1.6em; margin: 0 0 0.8125em;"&gt;Conclusão&lt;/H1&gt;&lt;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;Se o que você deseja fazer o QlikView oferece, então utilize! Sempre as funções prontas do QlikView oferecem melhor performance, mas nem tudo o QlikView nos oferece de "mão beijada", desta forma é bom estarmos preparados para essas ocasiões.&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt; &lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Até a próxima semana!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 31 May 2015 23:17:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Brasil/Acumulado-com-Express%C3%A3o/m-p/1472433#M54286</guid>
      <dc:creator>nicolett_yuri</dc:creator>
      <dc:date>2015-05-31T23:17:00Z</dc:date>
    </item>
    <item>
      <title>Re: Acumulado com Expressão</title>
      <link>https://community.qlik.com/t5/Brasil/Acumulado-com-Express%C3%A3o/m-p/1472434#M54287</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Adorei!! Obrigada Yuri! Estou em um projeto que agora precisou contar com estas funções, foi esclarecedor.&lt;/P&gt;&lt;P&gt;Abs,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jun 2015 12:24:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Brasil/Acumulado-com-Express%C3%A3o/m-p/1472434#M54287</guid>
      <dc:creator />
      <dc:date>2015-06-02T12:24:19Z</dc:date>
    </item>
    <item>
      <title>Re: Acumulado com Expressão</title>
      <link>https://community.qlik.com/t5/Brasil/Acumulado-com-Express%C3%A3o/m-p/1472435#M54288</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Obrigado Karla!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jun 2015 13:43:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Brasil/Acumulado-com-Express%C3%A3o/m-p/1472435#M54288</guid>
      <dc:creator>nicolett_yuri</dc:creator>
      <dc:date>2015-06-02T13:43:51Z</dc:date>
    </item>
  </channel>
</rss>

