<?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 Re: Duvida ultimo valor do mês in Brasil</title>
    <link>https://community.qlik.com/t5/Brasil/Duvida-ultimo-valor-do-m%C3%AAs/m-p/877857#M29097</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Pedro, disponibilize uma base de dados de teste&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 12 Jun 2015 13:04:56 GMT</pubDate>
    <dc:creator>nicolett_yuri</dc:creator>
    <dc:date>2015-06-12T13:04:56Z</dc:date>
    <item>
      <title>Duvida ultimo valor do mês</title>
      <link>https://community.qlik.com/t5/Brasil/Duvida-ultimo-valor-do-m%C3%AAs/m-p/877856#M29096</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin: 0 0 1.35em; color: #666666; font-family: Helvetica, Arial, sans-serif; font-size: 14px;"&gt;Prezados,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0 0 1.35em; color: #666666; font-family: Helvetica, Arial, sans-serif; font-size: 14px;"&gt;Tenho o seguinte problema:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0 0 1.35em; color: #666666; font-family: Helvetica, Arial, sans-serif; font-size: 14px;"&gt;Possuo um calendário fiscal onde:&lt;/P&gt;&lt;P style="margin: 0 0 1.35em; color: #666666; font-family: Helvetica, Arial, sans-serif; font-size: 14px;"&gt;Abril – 1&lt;/P&gt;&lt;P style="margin: 0 0 1.35em; color: #666666; font-family: Helvetica, Arial, sans-serif; font-size: 14px;"&gt;Maio – 2&lt;/P&gt;&lt;P style="margin: 0 0 1.35em; color: #666666; font-family: Helvetica, Arial, sans-serif; font-size: 14px;"&gt;Junho – 3&lt;/P&gt;&lt;P style="margin: 0 0 1.35em; color: #666666; font-family: Helvetica, Arial, sans-serif; font-size: 14px;"&gt;Julho – 4&lt;/P&gt;&lt;P style="margin: 0 0 1.35em; color: #666666; font-family: Helvetica, Arial, sans-serif; font-size: 14px;"&gt;Agosto – 5&lt;/P&gt;&lt;P style="margin: 0 0 1.35em; color: #666666; font-family: Helvetica, Arial, sans-serif; font-size: 14px;"&gt;Setembro – 6&lt;/P&gt;&lt;P style="margin: 0 0 1.35em; color: #666666; font-family: Helvetica, Arial, sans-serif; font-size: 14px;"&gt;Outubro – 7&lt;/P&gt;&lt;P style="margin: 0 0 1.35em; color: #666666; font-family: Helvetica, Arial, sans-serif; font-size: 14px;"&gt;Novembro – 8&lt;/P&gt;&lt;P style="margin: 0 0 1.35em; color: #666666; font-family: Helvetica, Arial, sans-serif; font-size: 14px;"&gt;Dezembro – 9&lt;/P&gt;&lt;P style="margin: 0 0 1.35em; color: #666666; font-family: Helvetica, Arial, sans-serif; font-size: 14px;"&gt;Janeiro – 10&lt;/P&gt;&lt;P style="margin: 0 0 1.35em; color: #666666; font-family: Helvetica, Arial, sans-serif; font-size: 14px;"&gt;Fevereiro – 11&lt;/P&gt;&lt;P style="margin: 0 0 1.35em; color: #666666; font-family: Helvetica, Arial, sans-serif; font-size: 14px;"&gt;Março – 12&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0 0 1.35em; color: #666666; font-family: Helvetica, Arial, sans-serif; font-size: 14px;"&gt;Possuímos um sistema de forecast onde estimamos as quantidades que serão vendidas no mês atual e dos próximos 6 meses. Exemplo:&lt;/P&gt;&lt;P style="margin: 0 0 1.35em; color: #666666; font-family: Helvetica, Arial, sans-serif; font-size: 14px; text-indent: 35.4pt;"&gt;Forecast de maio/2015 terá valores de maio até novembro.&lt;/P&gt;&lt;P style="margin: 0 0 1.35em; color: #666666; font-family: Helvetica, Arial, sans-serif; font-size: 14px; text-indent: 35.4pt;"&gt;Forecast de junho/2015 terá valores de junho até dezembro.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0 0 1.35em; color: #666666; font-family: Helvetica, Arial, sans-serif; font-size: 14px;"&gt;Neste caso, junho por exemplo, possui valores nos dois forecast. Porem apenas o último valor me interessa, por ser o mais atual.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0 0 1.35em; color: #666666; font-family: Helvetica, Arial, sans-serif; font-size: 14px;"&gt;Preciso demonstrar em uma &lt;STRONG style="text-decoration: underline;"&gt;tabela dinâmica&lt;/STRONG&gt;, os últimos valores de cada mês.&lt;/P&gt;&lt;P style="margin: 0 0 1.35em; color: #666666; font-family: Helvetica, Arial, sans-serif; font-size: 14px;"&gt;Tentei a seguinte expressão:&lt;/P&gt;&lt;P style="margin: 0 0 1.35em; color: #666666; font-family: Helvetica, Arial, sans-serif; font-size: 14px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: blue;"&gt;Sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;MesForecast&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt; = {&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: gray; font-size: 9pt; font-family: 'Courier New';"&gt;$(=Max(MesForecast))&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;} &amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;Quantidade&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0 0 1.35em; color: #666666; font-family: Helvetica, Arial, sans-serif; font-size: 14px;"&gt;Onde MesForecast me retorna o mês fiscal numérico. Desta forma os valores de junho até dezembro retornaram corretamente, porem &lt;STRONG&gt;maio&lt;/STRONG&gt;veio &lt;STRONG&gt;zerado&lt;/STRONG&gt;, pois o mesmo não existe no forecast de junho. No caso do mês de maio, deveria retornar o valor do último forecast valido para este mês.&lt;/P&gt;&lt;P style="margin: 0 0 1.35em; color: #666666; font-family: Helvetica, Arial, sans-serif; font-size: 14px;"&gt;Sendo assim, tentei utilizar o segundo parâmetro da função Max, para que o retorno ficasse dinâmico.&lt;/P&gt;&lt;P style="margin: 0 0 1.35em; color: #666666; font-family: Helvetica, Arial, sans-serif; font-size: 14px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN lang="EN-US" style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;=&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 9pt; font-family: 'Courier New'; color: blue;"&gt;sum&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;MesForecast&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt; ={&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="font-size: 9pt; font-family: 'Courier New'; color: gray;"&gt;$(=Max(MesForecast, Max(TOTAL MesForecast)-fMonth +1 ))&lt;/SPAN&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;} &amp;gt;} &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;Quantidade&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0 0 1.35em; color: #666666; font-family: Helvetica, Arial, sans-serif; font-size: 14px;"&gt;Sendo que:&lt;/P&gt;&lt;P style="margin: 0 0 1.35em; color: #666666; font-family: Helvetica, Arial, sans-serif; font-size: 14px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;&lt;EM style="color: gray; font-size: 9pt; font-family: 'Courier New';"&gt;Max(TOTAL MesForecast)&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp; - Retorna 3&lt;/P&gt;&lt;P style="margin: 0 0 1.35em; color: #666666; font-family: Helvetica, Arial, sans-serif; font-size: 14px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fMonth – O mês da dimensão. No caso de maio, retornaria 2&lt;/P&gt;&lt;P style="margin: 0 0 1.35em; color: #666666; font-family: Helvetica, Arial, sans-serif; font-size: 14px;"&gt;Então seria o mesmo que:&lt;/P&gt;&lt;P style="margin: 0 0 1.35em; color: #666666; font-family: Helvetica, Arial, sans-serif; font-size: 14px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: blue;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;MesForecast&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt; ={&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: gray; font-size: 9pt; font-family: 'Courier New';"&gt;$(=Max(MesForecast, 2))&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;} &amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;Quantidade&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0 0 1.35em; color: #666666; font-family: Helvetica, Arial, sans-serif; font-size: 14px;"&gt;Deveria trazer o segundo maior valor para maio. Porem maio fica zerado enquanto junho traz os valores corretamente.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jun 2015 18:54:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Brasil/Duvida-ultimo-valor-do-m%C3%AAs/m-p/877856#M29096</guid>
      <dc:creator />
      <dc:date>2015-06-11T18:54:26Z</dc:date>
    </item>
    <item>
      <title>Re: Duvida ultimo valor do mês</title>
      <link>https://community.qlik.com/t5/Brasil/Duvida-ultimo-valor-do-m%C3%AAs/m-p/877857#M29097</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Pedro, disponibilize uma base de dados de teste&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jun 2015 13:04:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Brasil/Duvida-ultimo-valor-do-m%C3%AAs/m-p/877857#M29097</guid>
      <dc:creator>nicolett_yuri</dc:creator>
      <dc:date>2015-06-12T13:04:56Z</dc:date>
    </item>
    <item>
      <title>Re: Duvida ultimo valor do mês</title>
      <link>https://community.qlik.com/t5/Brasil/Duvida-ultimo-valor-do-m%C3%AAs/m-p/877858#M29098</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yuri,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;segue em anexo um exemplo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Obrigado.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jun 2015 13:38:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Brasil/Duvida-ultimo-valor-do-m%C3%AAs/m-p/877858#M29098</guid>
      <dc:creator />
      <dc:date>2015-06-12T13:38:48Z</dc:date>
    </item>
    <item>
      <title>Re: Duvida ultimo valor do mês</title>
      <link>https://community.qlik.com/t5/Brasil/Duvida-ultimo-valor-do-m%C3%AAs/m-p/877859#M29099</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Já achou uma solução? Se sim, marque umas das respostas como "Correta" para fechar o tópico e nos ajudar a manter o forum organizado.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jul 2016 16:35:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Brasil/Duvida-ultimo-valor-do-m%C3%AAs/m-p/877859#M29099</guid>
      <dc:creator>Clever_Anjos</dc:creator>
      <dc:date>2016-07-06T16:35:20Z</dc:date>
    </item>
  </channel>
</rss>

