<?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: Compare data from two dates in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Compare-data-from-two-dates/m-p/328000#M579083</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create another variable with &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE class="jive-code"&gt;=AddMonth(MaxForecastDate, -1)&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;and use this new variable in the expression as you did previously&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 29 Feb 2012 14:28:51 GMT</pubDate>
    <dc:creator>jagan</dc:creator>
    <dc:date>2012-02-29T14:28:51Z</dc:date>
    <item>
      <title>Compare data from two dates</title>
      <link>https://community.qlik.com/t5/QlikView/Compare-data-from-two-dates/m-p/327995#M579075</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wish to compare forecasts from two different forecast versions,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a table which basically is design as such:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" height="140" style="width: 436px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD style="background-color: #0000f0;" width="73"&gt;ForecastDate&lt;/TD&gt;&lt;TD style="background-color: #0000f0;" width="73"&gt;SalesDate&lt;/TD&gt;&lt;TD style="background-color: #0000f0;" width="64"&gt;Forecast&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="20"&gt;2012-01-01&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;2012-03-01&lt;/TD&gt;&lt;TD align="right"&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="20"&gt;2012-01-01&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;2012-04-01&lt;/TD&gt;&lt;TD align="right"&gt;80&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="20"&gt;2012-01-01&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;2012-05-01&lt;/TD&gt;&lt;TD align="right"&gt;90&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="20"&gt;2012-02-01&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;2012-03-01&lt;/TD&gt;&lt;TD align="right"&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="20"&gt;2012-02-01&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;2012-04-01&lt;/TD&gt;&lt;TD align="right"&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="20"&gt;2012-02-01&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;2012-05-01&lt;/TD&gt;&lt;TD align="right"&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created a variable called MaxForecastDate defined as Max(ForecastDate). In this case, it returns '2012-02-01', and is used to determine the latest forecast version.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have then created a chart with dimension SalesDate and expression:&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&gt;=SUM({&amp;lt;GSFDate={'2012-02-01'} &amp;gt;} Forecast)&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works as expected, but I would like that the chart is dynamically updated when a new ForecastDate is added. To compare forecasts from the two forecast dates, I am planning to use the function AddMonth(MaxForecastDate, -1) .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be very appreciated!&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Feb 2012 14:06:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Compare-data-from-two-dates/m-p/327995#M579075</guid>
      <dc:creator />
      <dc:date>2012-02-29T14:06:41Z</dc:date>
    </item>
    <item>
      <title>Compare data from two dates</title>
      <link>https://community.qlik.com/t5/QlikView/Compare-data-from-two-dates/m-p/327996#M579076</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; You can try with this&lt;/P&gt;&lt;P&gt;&lt;CODE class="jive-code"&gt;=SUM({&amp;lt;GSFDate={'$(MaxForecastDate)'} &amp;gt;} Forecast)&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Celambarasan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Feb 2012 14:10:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Compare-data-from-two-dates/m-p/327996#M579076</guid>
      <dc:creator>CELAMBARASAN</dc:creator>
      <dc:date>2012-02-29T14:10:51Z</dc:date>
    </item>
    <item>
      <title>Compare data from two dates</title>
      <link>https://community.qlik.com/t5/QlikView/Compare-data-from-two-dates/m-p/327997#M579077</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Use this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE class="jive-code"&gt;=SUM({&amp;lt;GSFDate={'$(=(AddMonth(MaxForecastDate, -1)))'} &amp;gt;} Forecast)&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Feb 2012 14:15:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Compare-data-from-two-dates/m-p/327997#M579077</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2012-02-29T14:15:10Z</dc:date>
    </item>
    <item>
      <title>Compare data from two dates</title>
      <link>https://community.qlik.com/t5/QlikView/Compare-data-from-two-dates/m-p/327998#M579078</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perfect, I was trying with " istead of '...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I am trying to subtract a month,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=SUM({&amp;lt;ForecastDate={'$(AddMonth(MaxForecastDate, -1)'} &amp;gt;} Forecast)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Feb 2012 14:21:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Compare-data-from-two-dates/m-p/327998#M579078</guid>
      <dc:creator />
      <dc:date>2012-02-29T14:21:43Z</dc:date>
    </item>
    <item>
      <title>Compare data from two dates</title>
      <link>https://community.qlik.com/t5/QlikView/Compare-data-from-two-dates/m-p/327999#M579080</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jagan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is not returning any data. I can use &lt;CODE class="jive-code"&gt;AddMonth(MaxForecastDate, -1) as an expression which correctly returns '2012-01-01', but not when used in the set analysis.&lt;BR /&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Feb 2012 14:24:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Compare-data-from-two-dates/m-p/327999#M579080</guid>
      <dc:creator />
      <dc:date>2012-02-29T14:24:24Z</dc:date>
    </item>
    <item>
      <title>Re: Compare data from two dates</title>
      <link>https://community.qlik.com/t5/QlikView/Compare-data-from-two-dates/m-p/328000#M579083</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create another variable with &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE class="jive-code"&gt;=AddMonth(MaxForecastDate, -1)&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;and use this new variable in the expression as you did previously&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Feb 2012 14:28:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Compare-data-from-two-dates/m-p/328000#M579083</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2012-02-29T14:28:51Z</dc:date>
    </item>
    <item>
      <title>Compare data from two dates</title>
      <link>https://community.qlik.com/t5/QlikView/Compare-data-from-two-dates/m-p/328001#M579086</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I found the reason for the behaviour. AddMonth('2012-02-01', -1) returned '01-01-2012', which confused the set analysis. By applying the Date() function by Date(AddMonth('2012-02-01', -1), 'yyyy-MM-dd')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Feb 2012 14:34:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Compare-data-from-two-dates/m-p/328001#M579086</guid>
      <dc:creator />
      <dc:date>2012-02-29T14:34:59Z</dc:date>
    </item>
  </channel>
</rss>

