<?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: Latest value for each year in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Latest-value-for-each-year/m-p/102712#M763545</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please create flag for latest date in a Year using the below script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Table 1 is existing table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table2:&lt;/P&gt;&lt;P&gt;Load RecNo, Name,Date,Value,&lt;/P&gt;&lt;P&gt;if(year(Date)=previous(Year(Date),0,1) as Latest_Date_Year_flag&lt;/P&gt;&lt;P&gt;resident Table1 order by Date desc;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use &lt;SPAN style="font-size: 13.3333px;"&gt;Latest_Date_Year_flag column for filtering your data, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;only latest date in each year will get value as 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Sibin&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 03 Aug 2018 11:29:50 GMT</pubDate>
    <dc:creator>sibin_jacob</dc:creator>
    <dc:date>2018-08-03T11:29:50Z</dc:date>
    <item>
      <title>Latest value for each year</title>
      <link>https://community.qlik.com/t5/QlikView/Latest-value-for-each-year/m-p/102710#M763541</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Hi Everyone,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;I want to include two years of data into the report and i need to find latest value based on date column for each particular year.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;For 2018 the latest value is 3000. For 2017 latest value is 1000.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 280px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl63" height="18" width="70"&gt;Rec No&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="70"&gt;Name&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="70"&gt;Date&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="70"&gt;Value&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="18" style="border-top: none;"&gt;1&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;A&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;1/1/2018&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;1000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="18" style="border-top: none;"&gt;2&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;A&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;1/2/2018&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;2000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="18" style="border-top: none;"&gt;3&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;A&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;1/3/2018&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;3000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="18" style="border-top: none;"&gt;4&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;A&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;1/1/2017&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;1000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="18" style="border-top: none;"&gt;5&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;A&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;1/2/2017&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;3000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="18" style="border-top: none;"&gt;6&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;A&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;1/3/2017&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;&lt;P&gt;1000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&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;Thanks in Advance &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Latest-value-for-each-year/m-p/102710#M763541</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Latest value for each year</title>
      <link>https://community.qlik.com/t5/QlikView/Latest-value-for-each-year/m-p/102711#M763543</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1st create a Year field in the script and then you can do this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dimension&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Year&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FirstSortedValue(Value, -Date)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Aug 2018 11:13:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Latest-value-for-each-year/m-p/102711#M763543</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-08-03T11:13:04Z</dc:date>
    </item>
    <item>
      <title>Re: Latest value for each year</title>
      <link>https://community.qlik.com/t5/QlikView/Latest-value-for-each-year/m-p/102712#M763545</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please create flag for latest date in a Year using the below script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Table 1 is existing table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table2:&lt;/P&gt;&lt;P&gt;Load RecNo, Name,Date,Value,&lt;/P&gt;&lt;P&gt;if(year(Date)=previous(Year(Date),0,1) as Latest_Date_Year_flag&lt;/P&gt;&lt;P&gt;resident Table1 order by Date desc;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use &lt;SPAN style="font-size: 13.3333px;"&gt;Latest_Date_Year_flag column for filtering your data, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;only latest date in each year will get value as 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Sibin&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Aug 2018 11:29:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Latest-value-for-each-year/m-p/102712#M763545</guid>
      <dc:creator>sibin_jacob</dc:creator>
      <dc:date>2018-08-03T11:29:50Z</dc:date>
    </item>
    <item>
      <title>Re: Latest value for each year</title>
      <link>https://community.qlik.com/t5/QlikView/Latest-value-for-each-year/m-p/102713#M763546</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks it worked....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Aug 2018 14:55:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Latest-value-for-each-year/m-p/102713#M763546</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-08-03T14:55:01Z</dc:date>
    </item>
    <item>
      <title>Re: Latest value for each year</title>
      <link>https://community.qlik.com/t5/QlikView/Latest-value-for-each-year/m-p/102714#M763548</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sibin,&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Thanks for your reply. Suppose if i have data like below table, I&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt; need to find the latest value based on date column for each particular year. &lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 10pt;"&gt;It should work based on org filter.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;For 2018 the latest value for org 12300 is 3000. For 2017 latest value for org 12300 is 3000.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;For 2017 latest value for org 12302 is 3000.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" height="245" jive-data-cell="{&amp;quot;color&amp;quot;:&amp;quot;#575757&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;left&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;NaN&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;transparent&amp;quot;,&amp;quot;fontFamily&amp;quot;:&amp;quot;arial,helvetica,sans-serif&amp;quot;,&amp;quot;verticalAlign&amp;quot;:&amp;quot;baseline&amp;quot;}" jive-data-header="{&amp;quot;color&amp;quot;:&amp;quot;#FFFFFF&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;#6690BC&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;center&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;2&amp;quot;,&amp;quot;fontFamily&amp;quot;:&amp;quot;arial,helvetica,sans-serif&amp;quot;,&amp;quot;verticalAlign&amp;quot;:&amp;quot;baseline&amp;quot;}" style="width: 328px; height: 236px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD style="color: #575757; text-align: left; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;Rec No&lt;/TD&gt;&lt;TD style="color: #575757; text-align: left; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;Name&lt;/TD&gt;&lt;TD style="color: #575757; text-align: left; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;Date&lt;/TD&gt;&lt;TD style="color: #575757; text-align: left; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;Value&lt;/TD&gt;&lt;TD style="color: #575757; text-align: left; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;org&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="18" style="border-top: none; color: #575757; text-align: left; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;1&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none; color: #575757; text-align: left; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;A&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-top: none; border-left: none; color: #575757; text-align: left; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;1/1/2018&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none; color: #575757; text-align: left; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;1000&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-left: none; color: #575757; text-align: left; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;12300&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="18" style="border-top: none; color: #575757; text-align: left; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;2&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none; color: #575757; text-align: left; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;A&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-top: none; border-left: none; color: #575757; text-align: left; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;1/2/2018&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none; color: #575757; text-align: left; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;2000&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-left: none; color: #575757; text-align: left; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;12301&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="18" style="border-top: none; color: #575757; text-align: left; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;3&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none; color: #575757; text-align: left; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;A&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-top: none; border-left: none; color: #575757; text-align: left; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;1/3/2018&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none; color: #575757; text-align: left; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;3000&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-left: none; color: #575757; text-align: left; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;12300&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="18" style="border-top: none; color: #575757; text-align: left; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;4&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none; color: #575757; text-align: left; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;A&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-top: none; border-left: none; color: #575757; text-align: left; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;1/1/2017&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none; color: #575757; text-align: left; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;1000&lt;/TD&gt;&lt;TD align="right" style="color: #575757; text-align: left; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;12301&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="18" style="border-top: none; color: #575757; text-align: left; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;5&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none; color: #575757; text-align: left; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;A&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-top: none; border-left: none; color: #575757; text-align: left; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;1/2/2017&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none; color: #575757; text-align: left; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;3000&lt;/TD&gt;&lt;TD align="right" style="color: #575757; text-align: left; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;12300&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="18" style="border-top: none; color: #575757; text-align: left; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;6&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none; color: #575757; text-align: left; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;A&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-top: none; border-left: none; color: #575757; text-align: left; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;1/3/2017&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none; color: #575757; text-align: left; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;3000&lt;/TD&gt;&lt;TD align="right" style="color: #575757; text-align: left; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;12300&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="18" style="color: #575757; text-align: left; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;7&lt;/TD&gt;&lt;TD class="xl66" style="border-left: none; color: #575757; text-align: left; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;A&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-top: none; border-left: none; color: #575757; text-align: left; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;1/1/2017&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none; color: #575757; text-align: left; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;1000&lt;/TD&gt;&lt;TD align="right" style="color: #575757; text-align: left; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;12302&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="18" style="color: #575757; text-align: left; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;8&lt;/TD&gt;&lt;TD style="color: #575757; text-align: left; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;A&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-top: none; color: #575757; text-align: left; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;1/2/2017&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none; color: #575757; text-align: left; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;3000&lt;/TD&gt;&lt;TD align="right" style="color: #575757; text-align: left; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;12302&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="18" style="color: #575757; text-align: left; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;&lt;/TD&gt;&lt;TD style="color: #575757; text-align: left; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-top: none; color: #575757; text-align: left; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none; color: #575757; text-align: left; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;&lt;/TD&gt;&lt;TD align="right" style="color: #575757; text-align: left; background-color: rgba(0, 0, 0, 0); font-family: arial, helvetica, sans-serif; vertical-align: baseline;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Aug 2018 04:57:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Latest-value-for-each-year/m-p/102714#M763548</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-08-06T04:57:56Z</dc:date>
    </item>
    <item>
      <title>Re: Latest value for each year</title>
      <link>https://community.qlik.com/t5/QlikView/Latest-value-for-each-year/m-p/102715#M763549</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Try this one&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Table2:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Load RecNo, Name,Date,Value,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;if(org=prev(Org),0,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;if(year(Date)=previous(Year(Date),0,1)) as Latest_Date_Year_flag&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;resident Table1 order by Date,&lt;SPAN style="font-size: 13px;"&gt;org&lt;/SPAN&gt; desc;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Aug 2018 05:07:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Latest-value-for-each-year/m-p/102715#M763549</guid>
      <dc:creator>sibin_jacob</dc:creator>
      <dc:date>2018-08-06T05:07:06Z</dc:date>
    </item>
    <item>
      <title>Re: Latest value for each year</title>
      <link>https://community.qlik.com/t5/QlikView/Latest-value-for-each-year/m-p/102716#M763550</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried that. But it is not providing expected output.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Aug 2018 06:16:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Latest-value-for-each-year/m-p/102716#M763550</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-08-06T06:16:57Z</dc:date>
    </item>
    <item>
      <title>Re: Latest value for each year</title>
      <link>https://community.qlik.com/t5/QlikView/Latest-value-for-each-year/m-p/102717#M763551</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you ever get a chance to try this&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FirstSortedValue(Value, -Date)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This might need modification based on your data and needs, but with a little modification... the expression should work for you... for example... If you want to create a chart with Name, Year, and org as dimension... and the above expression... you will see this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/209941_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Selection Year = 2018, org = 12300&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/209948_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Selection Year&amp;nbsp; = 2017 and org = 12300&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-3" src="https://community.qlik.com/legacyfs/online/209949_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Selection Year = 2017 and org = 123002&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="image-4 jive-image" src="https://community.qlik.com/legacyfs/online/209950_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Aug 2018 11:10:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Latest-value-for-each-year/m-p/102717#M763551</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-08-06T11:10:22Z</dc:date>
    </item>
    <item>
      <title>Re: Latest value for each year</title>
      <link>https://community.qlik.com/t5/QlikView/Latest-value-for-each-year/m-p/102718#M763552</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have made few changes in the script, please check now,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Test:&lt;/P&gt;&lt;P&gt;LOad *Inline [&lt;/P&gt;&lt;P&gt;Rec No,Name,Date,Value,org&lt;/P&gt;&lt;P&gt;1,A,1/1/2018,1000,12300&lt;/P&gt;&lt;P&gt;2,A,1/2/2018,2000,12301&lt;/P&gt;&lt;P&gt;3,A,1/3/2018,3000,12300&lt;/P&gt;&lt;P&gt;4,A,1/1/2017,1000,12301&lt;/P&gt;&lt;P&gt;5,A,1/2/2017,3000,12300&lt;/P&gt;&lt;P&gt;6,A,1/3/2017,3000,12300&lt;/P&gt;&lt;P&gt;7,A,1/1/2017,1000,12302&lt;/P&gt;&lt;P&gt;8,A,1/2/2017,3000,12302&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//exit SCRIPT;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Test1:&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;/P&gt;&lt;P&gt;Load [Rec No],Name,&lt;/P&gt;&lt;P&gt;Date(Date#(Date,'DD/MM/YYYY'),'DD/MM/YYYY') as Date,&lt;/P&gt;&lt;P&gt;Value,org,&lt;/P&gt;&lt;P&gt;year(Date(Date#(Date,'DD/MM/YYYY'),'DD/MM/YYYY'))&amp;amp; org as Year_Org&lt;/P&gt;&lt;P&gt;Resident Test&lt;/P&gt;&lt;P&gt;order by Date desc;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP Table Test;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Exit SCRIPT;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table2:&lt;/P&gt;&lt;P&gt;Load [Rec No], Name,Date,Value,org,&lt;/P&gt;&lt;P&gt;if(Year_Org=previous(Year_Org),0,1) as Latest_Date_Year_flag,&lt;/P&gt;&lt;P&gt;Year_Org&lt;/P&gt;&lt;P&gt;resident Test1 &lt;/P&gt;&lt;P&gt;//where org=12302&lt;/P&gt;&lt;P&gt;order by Year_Org desc;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP Table Test1;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Aug 2018 11:41:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Latest-value-for-each-year/m-p/102718#M763552</guid>
      <dc:creator>sibin_jacob</dc:creator>
      <dc:date>2018-08-06T11:41:53Z</dc:date>
    </item>
    <item>
      <title>Re: Latest value for each year</title>
      <link>https://community.qlik.com/t5/QlikView/Latest-value-for-each-year/m-p/102719#M763553</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the response. It is working fine in the charts. I want to display average of first sorted value in the text box. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For 12300 (Latest value from both the years), average of first sorted value is&amp;nbsp; (3000+3000)/2 =3000 .&lt;/P&gt;&lt;P&gt;For 12301 Average of first sorted value = (1000+2000)/2.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Untitled.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/210017_Untitled.png" style="height: 857px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Aug 2018 16:44:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Latest-value-for-each-year/m-p/102719#M763553</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-08-06T16:44:40Z</dc:date>
    </item>
    <item>
      <title>Re: Latest value for each year</title>
      <link>https://community.qlik.com/t5/QlikView/Latest-value-for-each-year/m-p/102720#M763554</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In text box object... you can try this&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Avg(Aggr(FirstSortedValue(Value, -Date), Name, org, Year_Org))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When org = 12300 is selected&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/210007_Capture.PNG" style="height: 292px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When org = 12301 is selected&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/210020_Capture.PNG" style="height: 307px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Aug 2018 16:49:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Latest-value-for-each-year/m-p/102720#M763554</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-08-06T16:49:25Z</dc:date>
    </item>
    <item>
      <title>Re: Latest value for each year</title>
      <link>https://community.qlik.com/t5/QlikView/Latest-value-for-each-year/m-p/102721#M763555</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot .. It worked&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Aug 2018 08:09:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Latest-value-for-each-year/m-p/102721#M763555</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-08-07T08:09:14Z</dc:date>
    </item>
    <item>
      <title>Re: Latest value for each year</title>
      <link>https://community.qlik.com/t5/QlikView/Latest-value-for-each-year/m-p/102722#M763556</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your help...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Aug 2018 08:09:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Latest-value-for-each-year/m-p/102722#M763556</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-08-07T08:09:28Z</dc:date>
    </item>
    <item>
      <title>Re: Latest value for each year</title>
      <link>https://community.qlik.com/t5/QlikView/Latest-value-for-each-year/m-p/102723#M763557</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am glad we were able to help you &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Aug 2018 11:04:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Latest-value-for-each-year/m-p/102723#M763557</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-08-07T11:04:02Z</dc:date>
    </item>
  </channel>
</rss>

