<?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: IntervalMatch na Prática in Brasil</title>
    <link>https://community.qlik.com/t5/Brasil/IntervalMatch-na-Pr%C3%A1tica/m-p/1465567#M53976</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Muito bom.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 20 Apr 2015 20:40:41 GMT</pubDate>
    <dc:creator>lucianosv</dc:creator>
    <dc:date>2015-04-20T20:40:41Z</dc:date>
    <item>
      <title>IntervalMatch na Prática</title>
      <link>https://community.qlik.com/t5/Brasil/IntervalMatch-na-Pr%C3%A1tica/m-p/1465566#M53975</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 galera, tudo bom?&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;Já se depararam com uma situação em que era necessário fazer um JOIN entre tabelas, porém esse JOIN não é o valor exato da segunda tabela e sim um valor que esta dentro de um intervalo dela?&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;Por exemplo:&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;Tenho uma tabela com os limites das notas de uma escolha&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;de 0 até 34 é Nota "E"&lt;/LI&gt;&lt;LI&gt;de 35 até 40 é Nota "D"&lt;/LI&gt;&lt;LI&gt;de 41 até 60 é Nota "C"&lt;/LI&gt;&lt;LI&gt;de 61 até 80 é Nota "B"&lt;/LI&gt;&lt;LI&gt;de 81 até 100 é Nota "A"&lt;/LI&gt;&lt;/UL&gt;&lt;P&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;A nossa segunda tabela possui as notas dos alunos.&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;Nem sempre teremos uma nota com o valor dos limites do intervalo e isso impossibilita de resolvermos essa situação utilizando um comando de JOIN.&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;Podemos criar os registros que estão faltando no intervalo e depois é só fazer Join? Sim, para esse exemplo pode até funcionar, pois no total teremos 100 registros, mas e se a nossa tabela de "Range" possuir intervalos de milhares? milhões? Acho que para esses casos não seria uma boa solução, concordam?&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;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;IntervalMatch&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;O prefixo IntervalMatch é usado para criar uma tabela comparando valores numéricos discretos com um ou mais intervalos numéricos.&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;Ele deve ser colocado antes do Load ou declaração de Select (SQL) que carrega os intervalos. O campo que contém os pontos de dados discretos (Notas no exemplo abaixo) já deve ter sido carregado no QlikView antes do comando com o prefixo IntervalMatch. O prefixo não lê esse campo a partir da tabela da base de dados. O prefixo transforma a tabela carregada de intervalos em uma tabela que contém uma coluna adicional: os pontos de dados numéricos discretos Ele também expande o número de registros de forma que a nova tabela tenha um registro por combinação possível de ponto de dados discreto e intervalo.&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;Os intervalos podem estar sobrepostos e os valores discretos estarão vinculados a todos os intervalos&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;correspondentes.&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;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;Prática&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;Em primeiro lugar crie a nossa tabela com os intervalos.&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;Grade_Notas:&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;LOAD * INLINE [&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Min, Max, Grade&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;0, 34, E&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;35, 40, D&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;41, 60, C&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;61, 80, B&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;81, 100, A&lt;BR style="font-style: inherit; font-weight: inherit;" /&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;Agora vamos criar a nossa tabela das notas por aluno&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;Notas:&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;LOAD * INLINE [&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Nota, Aluno&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;30, Yuri&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;50, Edson&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;99, Alan&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;10, Geraldo&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;93, Henrique&lt;BR style="font-style: inherit; font-weight: inherit;" /&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;/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;Agora vamos para a utilização do IntervalMatch&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;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;A utilização do IntervalMatch deve-se partir da leitura da tabela de intervalos e o comando IntervalMatch deve-se relacionar com a coluna que deve ser checada dentro do intervalo:&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;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;Usando_IntervalMatch:&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;IntervalMatch(Nota) //Comando IntervalMatch chamando a coluna a ser checada dentro do Intervalo&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;LOAD&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Min, //Primeiro o menor valor do intervalo&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Max //depois o maior valor do intervalo&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;RESIDENT Grade; //Tabela de Intervalos&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;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;Como resultado agora teremos a tabela "Usando_IntervalMatch" que possui as colunas: Min, Max e Nota. Essa tabela já fez a ligação entre as tabelas Nota e Grade, veja:&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;A href="https://ynicolett.files.wordpress.com/2015/04/intervalmatch-01.jpg" style="color: #1b8be0; font-style: inherit; font-weight: inherit;"&gt;&lt;IMG alt="IntervalMatch 01" class="wp-image-129 alignnone jive-image size-medium" height="72" src="https://ynicolett.files.wordpress.com/2015/04/intervalmatch-01.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;/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;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;Agora é só fazer o JOIN necessário para remover essa chave sintética. Remova a parte do IntervalMatch e faça a alteração abaixo:&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;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;P style="color: #222222; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-bottom: 0.825em; font-size: 14px;"&gt;LEFT JOIN (Notas)&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;IntervalMatch(Nota) //Comando IntervalMatch chamando a coluna a ser checada dentro do Intervalo&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;LOAD&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Min, //Primeiro o menor valor do intervalo&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;Max //depois o maior valor do intervalo&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;RESIDENT Grade; //Tabela de Intervalos&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;LEFT JOIN (Notas)&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;LOAD&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;*&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;RESIDENT Grade;&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;DROP TABLE Grade;&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;DROP Fields Min, Max;&lt;BR style="font-style: inherit; font-weight: inherit;" /&gt;&amp;nbsp;&amp;nbsp; &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;&lt;/H2&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;&lt;/H2&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;Resultado final&lt;/H2&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;A href="https://ynicolett.files.wordpress.com/2015/04/intervalmatch-02.jpg" style="color: #1b8be0; font-style: inherit; font-weight: inherit;"&gt;&lt;IMG alt="IntervalMatch 02" class="wp-image-130 alignnone jive-image size-medium" height="186" src="https://ynicolett.files.wordpress.com/2015/04/intervalmatch-02.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;&lt;A href="https://drive.google.com/file/d/0B2cPTU8EF4R4NlFHbWticTdwQU0/view?usp=sharing" style="color: #1b8be0; font-style: inherit; font-weight: inherit;" target="_blank"&gt;A aplicação de exemplo pode ser baixada aqui!&lt;/A&gt;&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;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;É uma boa prática conhecermos muitas das funções que o QlikView nos oferece, pois estas funções sempre irão nos poupar linhas e linhas de código. A utilização do IntervalMatch também é o melhor recurso para essa situação, garantindo o resultado esperando com uma ótima performance na recarga do script.&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;Na próxima semana irei demonstrar como utilizar o IntervalMatch Estendido &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;Até a próxima semana!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Apr 2015 18:48:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Brasil/IntervalMatch-na-Pr%C3%A1tica/m-p/1465566#M53975</guid>
      <dc:creator>nicolett_yuri</dc:creator>
      <dc:date>2015-04-20T18:48:00Z</dc:date>
    </item>
    <item>
      <title>Re: IntervalMatch na Prática</title>
      <link>https://community.qlik.com/t5/Brasil/IntervalMatch-na-Pr%C3%A1tica/m-p/1465567#M53976</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Muito bom.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Apr 2015 20:40:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Brasil/IntervalMatch-na-Pr%C3%A1tica/m-p/1465567#M53976</guid>
      <dc:creator>lucianosv</dc:creator>
      <dc:date>2015-04-20T20:40:41Z</dc:date>
    </item>
    <item>
      <title>Re: IntervalMatch na Prática</title>
      <link>https://community.qlik.com/t5/Brasil/IntervalMatch-na-Pr%C3%A1tica/m-p/1465568#M53977</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Value Luciano &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/grin.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Apr 2015 14:16:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Brasil/IntervalMatch-na-Pr%C3%A1tica/m-p/1465568#M53977</guid>
      <dc:creator>nicolett_yuri</dc:creator>
      <dc:date>2015-04-22T14:16:43Z</dc:date>
    </item>
    <item>
      <title>Re: IntervalMatch na Prática</title>
      <link>https://community.qlik.com/t5/Brasil/IntervalMatch-na-Pr%C3%A1tica/m-p/1465569#M53978</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Obrigado! Muito boa a dica.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Apr 2015 19:42:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Brasil/IntervalMatch-na-Pr%C3%A1tica/m-p/1465569#M53978</guid>
      <dc:creator>fonmarcelo</dc:creator>
      <dc:date>2015-04-27T19:42:37Z</dc:date>
    </item>
  </channel>
</rss>

