<?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 Comparative Columns with a Pivot Table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Comparative-Columns-with-a-Pivot-Table/m-p/366712#M704006</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Julian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For testing, try the next expressions:&lt;BR /&gt;= YearMonth&lt;BR /&gt;=MONTHNAME(AddMonths(YearMonth, -1))&lt;BR /&gt;I suspect they are still different, for example the first expression returns &lt;STRONG&gt;'feb &lt;/STRONG&gt;2012' while the second - &lt;STRONG&gt;'Feb &lt;/STRONG&gt;2012'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 25 May 2012 10:17:45 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2012-05-25T10:17:45Z</dc:date>
    <item>
      <title>Comparative Columns with a Pivot Table</title>
      <link>https://community.qlik.com/t5/QlikView/Comparative-Columns-with-a-Pivot-Table/m-p/366709#M704003</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello there, I'm new with QV and Set Analysis&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a Pivot table with months (YearMonth) as Dimension and one Count (Files) as Expression. I need a new colum (expression) with the comparative value between the month and the last month,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using set analisys but I don't know what the problem is... this is the code for the second column:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-family: 'courier new', monospace; text-align: -webkit-auto; background-color: rgba(255, 255, 255, 0.917969);"&gt;COUNT({&amp;lt;YearMonth={"MONTH(AddMonths(YearMonth, -1))"}&amp;gt;} Files)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; text-align: -webkit-auto; background-color: rgba(255, 255, 255, 0.917969); font-family: arial, helvetica, sans-serif;"&gt;What is the problem with that?... &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; text-align: -webkit-auto; background-color: rgba(255, 255, 255, 0.917969); font-family: arial, helvetica, sans-serif;"&gt;Thanks for your help !&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 May 2012 22:34:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Comparative-Columns-with-a-Pivot-Table/m-p/366709#M704003</guid>
      <dc:creator>julian_rodriguez</dc:creator>
      <dc:date>2012-05-23T22:34:07Z</dc:date>
    </item>
    <item>
      <title>Comparative Columns with a Pivot Table</title>
      <link>https://community.qlik.com/t5/QlikView/Comparative-Columns-with-a-Pivot-Table/m-p/366710#M704004</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Julian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first problem is the syntax:&lt;BR /&gt;COUNT({&amp;lt;YearMonth={"&lt;STRONG&gt;$(&lt;/STRONG&gt;=MONTH(AddMonths(YearMonth, -1))&lt;STRONG&gt;)&lt;/STRONG&gt;"}&amp;gt;} Files)&lt;BR /&gt;The second problem is the data format.&amp;nbsp; Make sure that expression &lt;BR /&gt;=MONTH(AddMonths(YearMonth, -1))&lt;BR /&gt;returns data in the same format as YearMonth field.&amp;nbsp; I suspect that YearMonth includes both month and year, while the expression returns only month.&amp;nbsp; Maybe this is closer to what you need, assuming YearMonth format is YYYY-MMM:&lt;BR /&gt;=date(AddMonths(YearMonth, -1),'YYYY-MMM')&lt;/P&gt;&lt;P&gt;(I'm not sure if these are the only problems, just a quick look...)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 May 2012 10:32:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Comparative-Columns-with-a-Pivot-Table/m-p/366710#M704004</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-05-24T10:32:33Z</dc:date>
    </item>
    <item>
      <title>Re: Comparative Columns with a Pivot Table</title>
      <link>https://community.qlik.com/t5/QlikView/Comparative-Columns-with-a-Pivot-Table/m-p/366711#M704005</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Michael, thanks for your suggestion. I have changed the code in order to be sure that the format is equal, so this is it:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;=COUNT({&amp;lt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;YearMonth&lt;/SPAN&gt;={"$(=MONTHNAME(AddMonths(YearMonth, -1)))"}&amp;gt;} Files)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;Now, the operation always result in zero (0). Here is a screenshot of the table: &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;Dimensions: Zones and months&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;Expressions: &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A . Count of Files of the month&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; B . Percentage of Files on the month&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; C . Variation against last month (my problem)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="14716" alt="Tabla.jpg" class="jive-image-thumbnail jive-image" src="https://community.qlik.com/legacyfs/online/14716_Tabla.jpg" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 May 2012 13:34:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Comparative-Columns-with-a-Pivot-Table/m-p/366711#M704005</guid>
      <dc:creator>julian_rodriguez</dc:creator>
      <dc:date>2012-05-24T13:34:20Z</dc:date>
    </item>
    <item>
      <title>Comparative Columns with a Pivot Table</title>
      <link>https://community.qlik.com/t5/QlikView/Comparative-Columns-with-a-Pivot-Table/m-p/366712#M704006</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Julian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For testing, try the next expressions:&lt;BR /&gt;= YearMonth&lt;BR /&gt;=MONTHNAME(AddMonths(YearMonth, -1))&lt;BR /&gt;I suspect they are still different, for example the first expression returns &lt;STRONG&gt;'feb &lt;/STRONG&gt;2012' while the second - &lt;STRONG&gt;'Feb &lt;/STRONG&gt;2012'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 May 2012 10:17:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Comparative-Columns-with-a-Pivot-Table/m-p/366712#M704006</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-05-25T10:17:45Z</dc:date>
    </item>
    <item>
      <title>Re: Comparative Columns with a Pivot Table</title>
      <link>https://community.qlik.com/t5/QlikView/Comparative-Columns-with-a-Pivot-Table/m-p/366713#M704007</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Michael and everyone...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have solved my problem with the help of a friend of mine. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;He suggested me to use the BEFORE function. This was the code I use for the expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Before((COUNT(Distinct Files)))/COUNT(Distinct Files)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;And this is it.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;Thanks for your time and help!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;Julian&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 May 2012 13:10:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Comparative-Columns-with-a-Pivot-Table/m-p/366713#M704007</guid>
      <dc:creator>julian_rodriguez</dc:creator>
      <dc:date>2012-05-25T13:10:56Z</dc:date>
    </item>
  </channel>
</rss>

