<?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: Set Analysis compare with Previous Month in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-compare-with-Previous-Month/m-p/282452#M496953</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Miguel, I'm going to answer in english because I've seen other people complaining about writing in other languages.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the example that I upload before, the Calendar data is loaded from a DB:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Calendar:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;LOAD&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; *&lt;/SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;SQL SELECT dt, Y as Year, (Y*100)+M as MesAnio&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;FROM Calendar&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;WHERE Y &amp;gt;= 2009 and Y &amp;lt;= $(vCurrentYear);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this case, fields Y and M are both integer, so obviously MesAnio field are integer also, besides, in the preview of the Calendar table I see a number right aligned so I though it's a number on the QV table, is there a way to confirm that I'm using a number?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I select one month only, the expression is evaluated correctly... as you can see on the picture below the column title states "AVG({$&amp;lt;MesAnio={201107}&amp;gt;} PrecioPago)"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;IMG alt="qv1.JPG" class="jive-image-thumbnail jive-image" onclick="" src="https://community.qlik.com/legacyfs/online/8324_qv1.JPG" width="450" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 31 Oct 2011 17:32:45 GMT</pubDate>
    <dc:creator>rfigueroa</dc:creator>
    <dc:date>2011-10-31T17:32:45Z</dc:date>
    <item>
      <title>Set Analysis compare with Previous Month</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-compare-with-Previous-Month/m-p/282450#M496951</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to make a chart plotting the relation of current month vs. previous month, within current year.&lt;/P&gt;&lt;P&gt;I've tried some set analysis examples found on this forum but can't get it work.&lt;/P&gt;&lt;P&gt;I attached an example of what Im trying to do.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;Roberto.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Oct 2011 23:42:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-compare-with-Previous-Month/m-p/282450#M496951</guid>
      <dc:creator>rfigueroa</dc:creator>
      <dc:date>2011-10-28T23:42:08Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis compare with Previous Month</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-compare-with-Previous-Month/m-p/282451#M496952</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Roberto,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Deberías revisar tu tabla de calendario para verificar que los formatos de los distintos campos son los que realmente necesitas. En tu caso, la expresión que buscas es &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;Avg&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;({&amp;lt; &lt;/SPAN&gt;dt&lt;SPAN class="s2"&gt; = {&lt;/SPAN&gt;"&amp;gt;=$(=Date(MonthStart(Today()), 'DD/MM/YYYY hh:mm:ss TT'))&amp;lt;=$(=Date(MonthEnd(Today()), 'DD/MM/YYYY hh:mm:ss TT'))"&lt;SPAN class="s2"&gt;, &lt;/SPAN&gt;"&amp;gt;=$(=Date(MonthStart(AddMonths(Today(), -1)), 'DD/MM/YYYY hh:mm:ss TT'))&amp;lt;=$(=Date(MonthEnd(AddMonths(Today(), -1)), 'DD/MM/YYYY hh:mm:ss TT'))"&lt;SPAN class="s2"&gt;} &amp;gt;} &lt;/SPAN&gt;PrecioPago&lt;SPAN class="s2"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Se deben utilizar tantas funciones de formato por la diferencia entre lo que devuelve la función Date() y el formato del campo "dt". Podrías crear también un campo "flag" con valor 1 si la fecha del calendario es del mes actual y otra para el mes anterior.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Espero que te sirva.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/people/mabaeyens" style="outline-style: none; padding-top: 1px; padding-bottom: 1px; padding-left: 17px; color: #007fc0; zoom: 1; background-position: no-repeat no-repeat;"&gt;Miguel Angel Baeyens&lt;/A&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;BI Consultant&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;&lt;A class="jive-link-external-small" href="http://www.grupocomex.com/" style="outline-style: none; color: #007fc0;"&gt;Comex Grupo Ibérica&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 29 Oct 2011 00:51:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-compare-with-Previous-Month/m-p/282451#M496952</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2011-10-29T00:51:40Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis compare with Previous Month</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-compare-with-Previous-Month/m-p/282452#M496953</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Miguel, I'm going to answer in english because I've seen other people complaining about writing in other languages.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the example that I upload before, the Calendar data is loaded from a DB:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Calendar:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;LOAD&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; *&lt;/SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;SQL SELECT dt, Y as Year, (Y*100)+M as MesAnio&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;FROM Calendar&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;WHERE Y &amp;gt;= 2009 and Y &amp;lt;= $(vCurrentYear);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this case, fields Y and M are both integer, so obviously MesAnio field are integer also, besides, in the preview of the Calendar table I see a number right aligned so I though it's a number on the QV table, is there a way to confirm that I'm using a number?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I select one month only, the expression is evaluated correctly... as you can see on the picture below the column title states "AVG({$&amp;lt;MesAnio={201107}&amp;gt;} PrecioPago)"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;IMG alt="qv1.JPG" class="jive-image-thumbnail jive-image" onclick="" src="https://community.qlik.com/legacyfs/online/8324_qv1.JPG" width="450" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Oct 2011 17:32:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-compare-with-Previous-Month/m-p/282452#M496953</guid>
      <dc:creator>rfigueroa</dc:creator>
      <dc:date>2011-10-31T17:32:45Z</dc:date>
    </item>
  </channel>
</rss>

