<?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 How to compare months in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-compare-months/m-p/237135#M88237</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everybody,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a table with information since Jan 2008, and I want to compare the sales information between months, that means comparisson between each month with same month the year before&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for example&lt;/P&gt;&lt;P&gt;Sales (Jan 2009) / Sales (Jan 2008)&lt;/P&gt;&lt;P&gt;Sales (Feb 2009) / Sales (Feb 2008)&lt;/P&gt;&lt;P&gt;Sales (Apr 2009) / Sales (Apr 2008)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope you can help me&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 Oct 2010 17:29:36 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-10-13T17:29:36Z</dc:date>
    <item>
      <title>How to compare months</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-compare-months/m-p/237135#M88237</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everybody,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a table with information since Jan 2008, and I want to compare the sales information between months, that means comparisson between each month with same month the year before&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for example&lt;/P&gt;&lt;P&gt;Sales (Jan 2009) / Sales (Jan 2008)&lt;/P&gt;&lt;P&gt;Sales (Feb 2009) / Sales (Feb 2008)&lt;/P&gt;&lt;P&gt;Sales (Apr 2009) / Sales (Apr 2008)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope you can help me&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Oct 2010 17:29:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-compare-months/m-p/237135#M88237</guid>
      <dc:creator />
      <dc:date>2010-10-13T17:29:36Z</dc:date>
    </item>
    <item>
      <title>How to compare months</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-compare-months/m-p/237136#M88238</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;If use a Year how dimension you can create the expression:&lt;/P&gt;&lt;P&gt;SUM(Sales) / SUM(TOTAL IF(vDate = AddYears(vDate), -1), Sales))&lt;/P&gt;&lt;P&gt;This line just sum the current year of your dimension&lt;/P&gt;&lt;P&gt;"SUM(Sales)"&lt;/P&gt;&lt;P&gt;This Line sum all lines (years), but you filtering just last year&lt;/P&gt;&lt;P&gt;"SUM(TOTAL IF(vDate = AddYears(vDate), -1), Sales))"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Oct 2010 20:23:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-compare-months/m-p/237136#M88238</guid>
      <dc:creator />
      <dc:date>2010-10-13T20:23:29Z</dc:date>
    </item>
    <item>
      <title>How to compare months</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-compare-months/m-p/237137#M88239</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One way to do this is create a chart with Month as your dimension, then create three expressions:&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;Year={$(=max(Year))&amp;gt;} Sales)&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;Year={$(=max(Year)-1)&amp;gt;} Sales)&lt;/P&gt;&lt;P&gt;column(1)/column(2)&lt;/P&gt;&lt;P&gt;The current year and past year depend on your selection of year.&lt;/P&gt;&lt;P&gt;Also, please note that AddYears is not an QlikView function.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Oct 2010 05:45:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-compare-months/m-p/237137#M88239</guid>
      <dc:creator>pover</dc:creator>
      <dc:date>2010-10-14T05:45:24Z</dc:date>
    </item>
    <item>
      <title>How to compare months</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-compare-months/m-p/237138#M88240</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Karl,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried the example you have posted but with no good results because as months are dimensions for Jan 2009 only takes January Sales into account,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the big problem is that I need month as dimensions and also, users don't want to see sales period by period, they want to see only the growth by periods,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any other idea?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Oct 2010 13:36:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-compare-months/m-p/237138#M88240</guid>
      <dc:creator />
      <dc:date>2010-10-14T13:36:14Z</dc:date>
    </item>
    <item>
      <title>How to compare months</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-compare-months/m-p/237139#M88241</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Eduardo,&lt;/P&gt;&lt;P&gt;Thank you so much for your response, but this solution didn't work&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Oct 2010 13:46:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-compare-months/m-p/237139#M88241</guid>
      <dc:creator />
      <dc:date>2010-10-14T13:46:58Z</dc:date>
    </item>
    <item>
      <title>How to compare months</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-compare-months/m-p/237140#M88242</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Do you have a example on qvw?&lt;/P&gt;&lt;P&gt;It's more easy to understand your problem if we see how you make your model.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Oct 2010 13:51:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-compare-months/m-p/237140#M88242</guid>
      <dc:creator />
      <dc:date>2010-10-14T13:51:26Z</dc:date>
    </item>
    <item>
      <title>How to compare months</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-compare-months/m-p/237141#M88243</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Eduardo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here you have the example,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the expression "TOT" by now represents:&lt;/P&gt;&lt;P&gt;(Sales by month)/(Quarter Sales Average)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and we need to compare:&lt;/P&gt;&lt;P&gt;(Sales jan 2010) / (Sales jan 2009) and so on&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the expression your ideas are as comments if you want to review it,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you so much&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Oct 2010 14:14:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-compare-months/m-p/237141#M88243</guid>
      <dc:creator />
      <dc:date>2010-10-14T14:14:27Z</dc:date>
    </item>
    <item>
      <title>How to compare months</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-compare-months/m-p/237142#M88244</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I use the function BEFORE to compare the dates and change your dimension to order correct '01/2009' '01/2010' and not by string.&lt;/P&gt;&lt;P&gt;See the example i create a table with the new expression.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Oct 2010 15:04:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-compare-months/m-p/237142#M88244</guid>
      <dc:creator />
      <dc:date>2010-10-14T15:04:15Z</dc:date>
    </item>
    <item>
      <title>How to compare months</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-compare-months/m-p/237143#M88245</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Eduardo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you help me using only the sales information in the previos month and not using "quarter sales information"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Oct 2010 16:05:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-compare-months/m-p/237143#M88245</guid>
      <dc:creator />
      <dc:date>2010-10-14T16:05:29Z</dc:date>
    </item>
    <item>
      <title>How to compare months</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-compare-months/m-p/237144#M88246</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I read your script and the values of Quarter Sales Information are returned direct on your SQL Base.&lt;/P&gt;&lt;P&gt;You need to get this information from your BD.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Oct 2010 17:26:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-compare-months/m-p/237144#M88246</guid>
      <dc:creator />
      <dc:date>2010-10-14T17:26:39Z</dc:date>
    </item>
    <item>
      <title>How to compare months</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-compare-months/m-p/237145#M88247</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the problem is that in the example you have published you use quarte values, and I need months values&lt;/P&gt;&lt;P&gt;I'm so sorry but I am new on QV and I'm trying changing this complex thing, that's why I didn't get your solution Idea,&lt;/P&gt;&lt;P&gt;Could you please explain it better? or try to use it in the example you have sent,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Oct 2010 17:34:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-compare-months/m-p/237145#M88247</guid>
      <dc:creator />
      <dc:date>2010-10-14T17:34:53Z</dc:date>
    </item>
    <item>
      <title>How to compare months</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-compare-months/m-p/237146#M88248</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Angel,&lt;/P&gt;&lt;P&gt;You are correct that with the MonthYear dimension my formula doesn't work. You have to use Month as the dimension. See the attached example.&lt;/P&gt;&lt;P&gt;You have 2 other options. Use the before() function like Angel mentioned which is a decent solution or in the worse case situation use a dimension monthyear from a table island.&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Oct 2010 19:28:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-compare-months/m-p/237146#M88248</guid>
      <dc:creator>pover</dc:creator>
      <dc:date>2010-10-14T19:28:37Z</dc:date>
    </item>
    <item>
      <title>How to compare months</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-compare-months/m-p/237147#M88249</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;See this script:&lt;/P&gt;&lt;P&gt;TRIMESTRE_PRODUCTO:&lt;BR /&gt;Load&lt;BR /&gt;AUTONUMBER(PERIODOS &amp;amp; '-' &amp;amp; MERCADO &amp;amp; '-' &amp;amp; PRODUCTO &amp;amp; '-' &amp;amp; COD_BRICK) AS PMPB,&lt;BR /&gt;TRIMESTRE_PRODUCTO,&lt;BR /&gt;TRIMESTRE_PRODUCTO_KILOS;&lt;BR /&gt;SQL SELECT&lt;BR /&gt; "co_producto_pfz" AS MERCADO,&lt;BR /&gt; "co_brick" AS COD_BRICK,&lt;BR /&gt; "co_producto" as PRODUCTO,&lt;BR /&gt; ('01/' + periodo) AS PERIODOS,&lt;BR /&gt; "promedio_trimestre" AS TRIMESTRE_PRODUCTO,&lt;BR /&gt; "promedio_trimestre_kilos" as TRIMESTRE_PRODUCTO_KILOS&lt;BR /&gt;FROM "DDD_TMP2" WHERE substring(periodo,4,4) &amp;gt;='2007';&lt;/P&gt;&lt;P&gt;Your script just return the values of TRIMESTRE (QUARTER) direct on yhour Data Base (fields promedio_trimestre and promedio_trimestre_kilos).&lt;/P&gt;&lt;P&gt;If you want the month values, you need to return from your data base.&lt;/P&gt;&lt;P&gt;I don't know how to help you in this case, because i don't know how to work your DB.&lt;/P&gt;&lt;P&gt;Sorry&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Oct 2010 19:36:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-compare-months/m-p/237147#M88249</guid>
      <dc:creator />
      <dc:date>2010-10-14T19:36:45Z</dc:date>
    </item>
    <item>
      <title>How to compare months</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-compare-months/m-p/237148#M88250</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Eduardo you are right,&lt;/P&gt;&lt;P&gt;But what I'm talking about is not to use the Quarte value ("TRIMESTRE") and to use ("UNIDADES") instead of that,&lt;/P&gt;&lt;P&gt;But the problem is how to sumarize two diferents months and get the diferences between them or in other words "growth"&lt;/P&gt;&lt;P&gt;growth in this month is represented by this formula:&lt;/P&gt;&lt;P&gt;(Units Values (octuber 2010) / Units Values (octuber 2009)) - 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Oct 2010 19:44:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-compare-months/m-p/237148#M88250</guid>
      <dc:creator />
      <dc:date>2010-10-14T19:44:56Z</dc:date>
    </item>
    <item>
      <title>How to compare months</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-compare-months/m-p/237149#M88251</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;So this expression are you want ok&lt;/P&gt;&lt;P&gt;"Sum(IF(VISTA='UNIDADES',UNIDADES,KILOS))"&lt;/P&gt;&lt;P&gt;in your char the expression is&lt;/P&gt;&lt;P&gt;"IF(NUM(Month(PERIODOS), '00') = BEFORE(NUM(Month(PERIODOS), '00')) AND (Year(PERIODOS) - 1) = BEFORE(Year(PERIODOS)),&lt;BR /&gt; BEFORE(Sum(IF(VISTA='UNIDADES',UNIDADES,KILOS))) / Sum(IF(VISTA='UNIDADES',UNIDADES,KILOS)) , 0)"&lt;/P&gt;&lt;P&gt;The function Before return the last line, in this case '01/2009' and the current row '01/2010'.&lt;/P&gt;&lt;P&gt;In the some line you have two values (01/2009 and 01/2010) because the inter-records function.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Oct 2010 20:22:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-compare-months/m-p/237149#M88251</guid>
      <dc:creator />
      <dc:date>2010-10-14T20:22:58Z</dc:date>
    </item>
    <item>
      <title>How to compare months</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-compare-months/m-p/237150#M88252</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you so much , two solutions were almost the same and closed to what I was hopping&lt;/P&gt;&lt;P&gt;Your help was so useful&lt;/P&gt;&lt;P&gt;I really appreciated&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Oct 2010 20:46:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-compare-months/m-p/237150#M88252</guid>
      <dc:creator />
      <dc:date>2010-10-14T20:46:03Z</dc:date>
    </item>
  </channel>
</rss>

