<?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:Previous Month in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Previous-Month/m-p/208250#M63683</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Sergio&lt;/P&gt;&lt;P&gt;in you expression you have hard coded month to 1&lt;/P&gt;&lt;P&gt;F_Month = 1&lt;/P&gt;&lt;P&gt;how will it be dynamic ????&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 10 Feb 2011 08:02:25 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-02-10T08:02:25Z</dc:date>
    <item>
      <title>Previous Month</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-Month/m-p/208248#M63681</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there, i have a problem with set analysis again. Here i go:&lt;/P&gt;&lt;P&gt;I have a table with inbounds calls with the following structure:&lt;/P&gt;&lt;P&gt;F_INBOUND_DATES:&lt;/P&gt;&lt;P&gt;&lt;B&gt;LOAD&lt;/B&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;F_Primary_ID,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;F_Date,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;F_DatePreviousMonth,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;F_Year,&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;F_Month,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;F_PrevMonth,&lt;/P&gt;&lt;P&gt;F_MonthYear,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;F_PrevMonthYear&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;FROM&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;\&lt;B&gt;&lt;I&gt;$(_SysDirQvd)&lt;/I&gt;&lt;/B&gt; \LK_TIE_DIA.qvd (qvd);&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;And a table of facts like this:&lt;/P&gt;&lt;P&gt;BT_INBOUND:&lt;/P&gt;&lt;P&gt;&lt;B&gt;LOAD&lt;/B&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;F_Primary_ID,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BT_QInbound,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BT_QLostInbound,&lt;/P&gt;&lt;P&gt;BT_Channel,&lt;/P&gt;&lt;P&gt;....etc&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;B&gt;FROM&lt;/B&gt; &lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;\&lt;B&gt;&lt;I&gt;$(_SysDirQvd)&lt;/I&gt;&lt;/B&gt; \BT_IN.qvd (qvd);&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to do a pivot table with a comparison between actual month and previous month of the BT_QInbound. For that, I have created the following table:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="error loading image" class="jive-image error-loading-image" src="https://community.qlik.com/legacyfs/online/-3511_sourceID:3511" /&gt;&lt;/P&gt;&lt;P&gt;The expression on previous month like this:&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;if(F_Month=1,&lt;/P&gt;&lt;P style="font-weight: bold"&gt;sum({$&amp;lt;F_Month={"$(=only(F_PrevMonth))"},F_Year={"$(=only(F_Year-1))"}&amp;gt;} BT_QInbound),&lt;/P&gt;&lt;P style="font-weight: bold"&gt;sum({$&amp;lt;F_Month={"$(=only(F_PrevMonth))"},F_Year={"$(=only(F_Year))"}&amp;gt;} BT_QInbound)&lt;/P&gt;&lt;P style="font-weight: bold"&gt;)&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;B&gt;&lt;/B&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;B&gt;&lt;/B&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Until here evrithing it's ok, but when i select a range of days of a month the column Q Previous Month is set all to null (-), and i need that column shows the same sum but only during the days i select.&lt;/P&gt;&lt;P&gt;Well, thanks to all for the information.&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Feb 2011 16:27:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-Month/m-p/208248#M63681</guid>
      <dc:creator>sergio</dc:creator>
      <dc:date>2011-02-09T16:27:38Z</dc:date>
    </item>
    <item>
      <title>Previous Month</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-Month/m-p/208249#M63682</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have found a solution, the correct expression is:&lt;/P&gt;&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;if(F_Month=1, &lt;B&gt;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;F_Month={"$(=only(F_PrevMonth))"},F_Year={"$(=only(F_Year-1)),F_Date={"*"}"}&amp;gt;} BT_QInbound),&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;F_Month={"$(=only(F_PrevMonth))"},F_Year={"$(=only(F_Year)),F_Date={"*"}"}&amp;gt;} BT_QInbound)&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Feb 2011 19:44:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-Month/m-p/208249#M63682</guid>
      <dc:creator>sergio</dc:creator>
      <dc:date>2011-02-09T19:44:00Z</dc:date>
    </item>
    <item>
      <title>Re:Previous Month</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-Month/m-p/208250#M63683</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Sergio&lt;/P&gt;&lt;P&gt;in you expression you have hard coded month to 1&lt;/P&gt;&lt;P&gt;F_Month = 1&lt;/P&gt;&lt;P&gt;how will it be dynamic ????&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Feb 2011 08:02:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-Month/m-p/208250#M63683</guid>
      <dc:creator />
      <dc:date>2011-02-10T08:02:25Z</dc:date>
    </item>
    <item>
      <title>Re:Previous Month</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-Month/m-p/208251#M63684</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="jive_text_macro jive_macro_quote" jivemacro="quote"&gt;&lt;BR /&gt;AshwinPagare wrote:&lt;BR /&gt;HI Sergio&lt;BR /&gt;in you expression you have hard coded month to 1&lt;BR /&gt;F_Month = 1&lt;BR /&gt;how will it be dynamic ????&amp;lt;div&amp;gt;&amp;lt;/div&amp;gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Hi AshwinPagare, i'm not hard coding, i'm asking for January to know if i have to substract 1 to the year or not, because the previous year to january 2011 is december 2010.&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Feb 2011 13:14:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-Month/m-p/208251#M63684</guid>
      <dc:creator>sergio</dc:creator>
      <dc:date>2011-02-10T13:14:48Z</dc:date>
    </item>
  </channel>
</rss>

