<?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: Date vs Last month same date in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Date-vs-Last-month-same-date/m-p/459006#M171327</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hiiiii&lt;/P&gt;&lt;P&gt;See the attached file&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in your script&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;load &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DATE(Date#(Date,'DD-MM-YYYY'),'DD/MM/YYYY') AS DATE, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DAY(Date#(Date,'DD-MM-YYYY')) AS Day,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Value&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;from mytable;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then in straight table--&lt;/P&gt;&lt;P&gt;calculateDimension--&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;=Aggr(max(DATE),Day)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Expression1---&amp;nbsp; &lt;/STRONG&gt;Aggr(FirstSortedValue(Value,-DATE),Day)&lt;/P&gt;&lt;P&gt;Expression2--&amp;nbsp;&amp;nbsp; Aggr(FirstSortedValue(Value,DATE),Day)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then outputlike this&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="353"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl63" height="17" width="98"&gt;Date&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="98"&gt;A&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="157"&gt;Same Day LastM&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt; &lt;/TD&gt;&lt;TD class="xl65" style="border-top: none;"&gt;-&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;-&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="17" style="border-top: none;"&gt;01/06/2012&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;15&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="17" style="border-top: none;"&gt;02/06/2012&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;30&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;50&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="17" style="border-top: none;"&gt;03/06/2012&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;17&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 11 Jun 2013 10:27:49 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-06-11T10:27:49Z</dc:date>
    <item>
      <title>Date vs Last month same date</title>
      <link>https://community.qlik.com/t5/QlikView/Date-vs-Last-month-same-date/m-p/459005#M171326</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm new to qlikview and i need some help with it. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a table with some records with dimension "Date" and "a".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What i want is to get values from dimensions "A"&amp;nbsp; coresponding to same date from last month.&lt;/P&gt;&lt;P&gt;I know how to do this in script, but i want the same result using only expresions in a straight table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Records&lt;/STRONG&gt;:&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 147px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" width="83"&gt;Date&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="64"&gt;Value&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="20" style="border-top: none;"&gt;01-05-2012&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="20" style="border-top: none;"&gt;02-05-2012&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;50&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="20" style="border-top: none;"&gt;03-05-2012&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;17&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="20" style="border-top: none;"&gt;01-06-2012&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;15&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="20" style="border-top: none;"&gt;02-06-2012&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;30&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="20" style="border-top: none;"&gt;03-06-2012&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Result&lt;/STRONG&gt;:&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 218px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" width="73"&gt;Date&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="64"&gt;A&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="81"&gt;Same Day LastM&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="20" style="border-top: none;"&gt;01-06-2012&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;15&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="20" style="border-top: none;"&gt;02-06-2012&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;30&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;50&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="20" style="border-top: none;"&gt;03-06-2012&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;17&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 also attached an example on how to i did it with script &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tnx in advance for help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Jun 2013 09:03:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-vs-Last-month-same-date/m-p/459005#M171326</guid>
      <dc:creator />
      <dc:date>2013-06-11T09:03:07Z</dc:date>
    </item>
    <item>
      <title>Re: Date vs Last month same date</title>
      <link>https://community.qlik.com/t5/QlikView/Date-vs-Last-month-same-date/m-p/459006#M171327</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hiiiii&lt;/P&gt;&lt;P&gt;See the attached file&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in your script&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;load &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DATE(Date#(Date,'DD-MM-YYYY'),'DD/MM/YYYY') AS DATE, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DAY(Date#(Date,'DD-MM-YYYY')) AS Day,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Value&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;from mytable;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then in straight table--&lt;/P&gt;&lt;P&gt;calculateDimension--&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;=Aggr(max(DATE),Day)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Expression1---&amp;nbsp; &lt;/STRONG&gt;Aggr(FirstSortedValue(Value,-DATE),Day)&lt;/P&gt;&lt;P&gt;Expression2--&amp;nbsp;&amp;nbsp; Aggr(FirstSortedValue(Value,DATE),Day)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then outputlike this&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="353"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl63" height="17" width="98"&gt;Date&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="98"&gt;A&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="157"&gt;Same Day LastM&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt; &lt;/TD&gt;&lt;TD class="xl65" style="border-top: none;"&gt;-&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;-&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="17" style="border-top: none;"&gt;01/06/2012&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;15&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="17" style="border-top: none;"&gt;02/06/2012&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;30&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;50&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="17" style="border-top: none;"&gt;03/06/2012&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;17&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Jun 2013 10:27:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-vs-Last-month-same-date/m-p/459006#M171327</guid>
      <dc:creator />
      <dc:date>2013-06-11T10:27:49Z</dc:date>
    </item>
    <item>
      <title>Re: Date vs Last month same date</title>
      <link>https://community.qlik.com/t5/QlikView/Date-vs-Last-month-same-date/m-p/459007#M171328</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if your problem resolved then marked it as either correct or helpful according to your question so that it might be helpful for other developer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards &lt;/P&gt;&lt;P&gt;Vishwaranjan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Jun 2013 10:40:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-vs-Last-month-same-date/m-p/459007#M171328</guid>
      <dc:creator />
      <dc:date>2013-06-11T10:40:40Z</dc:date>
    </item>
  </channel>
</rss>

