<?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: Show latest 12 months date in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Show-latest-12-months-date/m-p/928319#M321186</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It depends on what your 'date' field really contains. You need a date field with real dates or numbers to be able to calculated a maximum value to retrieve the latest value. Once you have that you can calculate what the latest 12 months are.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this load statement a date field is created from a field that contains text values like 'Jan-14'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ... some fields...,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; date(date#(MyDate,'MMM-YY'),'MMM-YY') as MyDate,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ....some other fields...&lt;/P&gt;&lt;P&gt;FROM ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now that MyDate is a real date you can use it in expressions to make the chart show the latest 12 months. Suppose you have an expression in your chart like sum(Sales). To make sure the charts shows only the information of the latest 12 months you add a records set definition to it:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt;MyDate={"&amp;gt;$(=AddMonths(Max(MyDate),-12))"}&amp;gt;}Sales).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max(MyDate) calculates the latest month. AddMonths(...,-12) then calculates the MyDate value that's 12 months earlier. And the larger then operator {"&lt;STRONG&gt;&amp;gt;&lt;/STRONG&gt; ..."} is used to filter the field MyDate to select only those MyDate values that are larger than the value that's 12 months before the maximum, i.e. latest, MyDate value.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Nov 2015 05:54:21 GMT</pubDate>
    <dc:creator>Gysbert_Wassenaar</dc:creator>
    <dc:date>2015-11-18T05:54:21Z</dc:date>
    <item>
      <title>Show latest 12 months date</title>
      <link>https://community.qlik.com/t5/QlikView/Show-latest-12-months-date/m-p/928316#M321183</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 have date field which has dates like Jan-14, Feb-14, Mar-14......... Dec-15 and the data keeps increasing like Jan-16, Feb-16 and so on.&lt;/P&gt;&lt;P&gt;I have to show always latest 12 months date in the chart and tables.&lt;/P&gt;&lt;P&gt;How to achieve this condition?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Nov 2015 05:41:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Show-latest-12-months-date/m-p/928316#M321183</guid>
      <dc:creator>udaya_kumar</dc:creator>
      <dc:date>2015-11-18T05:41:31Z</dc:date>
    </item>
    <item>
      <title>Re: Show latest 12 months date</title>
      <link>https://community.qlik.com/t5/QlikView/Show-latest-12-months-date/m-p/928317#M321184</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try this&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Sum({&amp;lt;Year=, Quarter=, Month=, Week=, Date={‘&amp;gt;=$(=MonthStart(Today(), -11))&amp;lt;=$(=Today())’}&amp;gt;} Sales )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;for more check this link&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;A href="https://community.qlik.com/docs/DOC-9162"&gt;Set Analysis for certain Point in Time&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Nov 2015 05:44:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Show-latest-12-months-date/m-p/928317#M321184</guid>
      <dc:creator>arulsettu</dc:creator>
      <dc:date>2015-11-18T05:44:20Z</dc:date>
    </item>
    <item>
      <title>Re: Show latest 12 months date</title>
      <link>https://community.qlik.com/t5/QlikView/Show-latest-12-months-date/m-p/928318#M321185</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;see these threads:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/thread/65919"&gt;Show past 12 months&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/thread/164141"&gt;How to display Last 12 Month in Dimension in Bar Chart&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/thread/102763"&gt;Displaying last 12 months trend&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Make sure format should be same for everyone.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Nov 2015 05:46:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Show-latest-12-months-date/m-p/928318#M321185</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-11-18T05:46:54Z</dc:date>
    </item>
    <item>
      <title>Re: Show latest 12 months date</title>
      <link>https://community.qlik.com/t5/QlikView/Show-latest-12-months-date/m-p/928319#M321186</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It depends on what your 'date' field really contains. You need a date field with real dates or numbers to be able to calculated a maximum value to retrieve the latest value. Once you have that you can calculate what the latest 12 months are.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this load statement a date field is created from a field that contains text values like 'Jan-14'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ... some fields...,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; date(date#(MyDate,'MMM-YY'),'MMM-YY') as MyDate,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ....some other fields...&lt;/P&gt;&lt;P&gt;FROM ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now that MyDate is a real date you can use it in expressions to make the chart show the latest 12 months. Suppose you have an expression in your chart like sum(Sales). To make sure the charts shows only the information of the latest 12 months you add a records set definition to it:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt;MyDate={"&amp;gt;$(=AddMonths(Max(MyDate),-12))"}&amp;gt;}Sales).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max(MyDate) calculates the latest month. AddMonths(...,-12) then calculates the MyDate value that's 12 months earlier. And the larger then operator {"&lt;STRONG&gt;&amp;gt;&lt;/STRONG&gt; ..."} is used to filter the field MyDate to select only those MyDate values that are larger than the value that's 12 months before the maximum, i.e. latest, MyDate value.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Nov 2015 05:54:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Show-latest-12-months-date/m-p/928319#M321186</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2015-11-18T05:54:21Z</dc:date>
    </item>
  </channel>
</rss>

