<?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: How to take LastValue data only for certain range in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-take-LastValue-data-only-for-certain-range/m-p/1506991#M600614</link>
    <description>&lt;P&gt;Hello, thanks a lot for your answer, but it`s not working correctly.&lt;/P&gt;&lt;P&gt;I had another option, to make flag:&lt;BR /&gt;text(TCODE&amp;amp;CHANGE_IND&amp;amp;AutoNumber(CHANGENR&amp;amp;TCODE&amp;amp;CHANGE_IND)) as FINAL_FLAG&lt;/P&gt;&lt;P&gt;And to make such formula:&lt;BR /&gt;CDHDR_TMP2:&lt;BR /&gt;load*,&lt;BR /&gt;If(If(FirstValue(Left(FINAL_FLAG,6)='ME21NU'),FINAL_FLAG-'1'),1,0) as Indicator&lt;BR /&gt;resident CDHDR_TMP;&lt;BR /&gt;drop table CDHDR_TMP;&lt;BR /&gt;But the problem that Qlik is telling that "Invalid Expression". Can you advise what`s the problem?&lt;/P&gt;&lt;P&gt;Thanks a lot&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 15 Nov 2018 09:52:50 GMT</pubDate>
    <dc:creator>ivanaksen</dc:creator>
    <dc:date>2018-11-15T09:52:50Z</dc:date>
    <item>
      <title>How to take LastValue data only for certain range</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-take-LastValue-data-only-for-certain-range/m-p/1506159#M600607</link>
      <description>&lt;P&gt;Hello everybody,&lt;BR /&gt;Please support with bellow question:&lt;BR /&gt;It`s necessary to take "lastvalue" in the certain range of data.&lt;BR /&gt;The main idea of this range, is to take LastValue&amp;nbsp;ONLY for the first range(green frame on the print screen bellow), the main indicator which is starting new range is TCODE "ME21N".&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.jpg" style="width: 192px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/144i87A294DBA601FDEA/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.jpg" alt="1.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Before I had bellow formula in the script, But it takes only the very last value (the red frame with "17.10.2018" from print screen).:&lt;/P&gt;&lt;P&gt;LastValue:&lt;BR /&gt;LOAD CDHDR_KEY,&lt;BR /&gt;LastValue(PO_Appr.Date_TMP) as Last_PO_Apprv_Date,&lt;BR /&gt;LastValue(USERNAME) as Last_PO_Approver&lt;BR /&gt;Resident CDHDR_FINAL&lt;BR /&gt;Group By CDHDR_KEY&lt;BR /&gt;Order by PO_Appr.Date_TMP;&lt;/P&gt;&lt;P&gt;Can you advise, how can use&amp;nbsp;above formula, but with indicator: "to take data only before next "ME21N"?&lt;/P&gt;&lt;P&gt;Thanks a lot in advance.&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 21:53:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-take-LastValue-data-only-for-certain-range/m-p/1506159#M600607</guid>
      <dc:creator>ivanaksen</dc:creator>
      <dc:date>2024-11-16T21:53:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to take LastValue data only for certain range</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-take-LastValue-data-only-for-certain-range/m-p/1506166#M600608</link>
      <description>&lt;P&gt;May be this&lt;/P&gt;&lt;PRE&gt;LastValue:
LOAD CDHDR_KEY,
   Max(PO_Appr.Date_TMP) as Last_PO_Apprv_Date,
   FirstSortedValue(USERNAME, -PO_Appr.Date_TMP) as Last_PO_Approver
Resident CDHDR_FINAL
Group By CDHDR_KEY;&lt;/PRE&gt;</description>
      <pubDate>Wed, 14 Nov 2018 12:30:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-take-LastValue-data-only-for-certain-range/m-p/1506166#M600608</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-11-14T12:30:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to take LastValue data only for certain range</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-take-LastValue-data-only-for-certain-range/m-p/1506259#M600609</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Thank you, but unfortunately it`s not working,&lt;BR /&gt;maybe something with&amp;nbsp; functions Previous?&lt;BR /&gt;&lt;SPAN&gt;IF(x=Previous(x) AND y=Previous(y),'0','1') AS COUNT_FLAG,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;if(&lt;/SPAN&gt;&lt;SPAN&gt;z&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;Previous(&lt;/SPAN&gt;&lt;SPAN&gt;z&lt;/SPAN&gt;&lt;SPAN&gt;) and &lt;/SPAN&gt;&lt;SPAN&gt;x&lt;/SPAN&gt;&lt;SPAN&gt;=Previous(&lt;/SPAN&gt;&lt;SPAN&gt;x&lt;/SPAN&gt;&lt;SPAN&gt;),'1','0')&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;as Vizualization_Flag?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Nov 2018 13:28:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-take-LastValue-data-only-for-certain-range/m-p/1506259#M600609</guid>
      <dc:creator>ivanaksen</dc:creator>
      <dc:date>2018-11-14T13:28:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to take LastValue data only for certain range</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-take-LastValue-data-only-for-certain-range/m-p/1506289#M600610</link>
      <description>&lt;P&gt;Previous function? But I don't even have Previous in the code that I shared? I am confused... can you elaborate?&lt;/P&gt;</description>
      <pubDate>Wed, 14 Nov 2018 13:44:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-take-LastValue-data-only-for-certain-range/m-p/1506289#M600610</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-11-14T13:44:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to take LastValue data only for certain range</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-take-LastValue-data-only-for-certain-range/m-p/1506290#M600611</link>
      <description>&lt;P&gt;no, no&lt;/P&gt;&lt;P&gt;Command with the name "Previous". I attached in the previous message an example of such command.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Nov 2018 13:47:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-take-LastValue-data-only-for-certain-range/m-p/1506290#M600611</guid>
      <dc:creator>ivanaksen</dc:creator>
      <dc:date>2018-11-14T13:47:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to take LastValue data only for certain range</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-take-LastValue-data-only-for-certain-range/m-p/1506292#M600612</link>
      <description>&lt;P&gt;How is this new code you shared linked to what you initially provided?&lt;/P&gt;</description>
      <pubDate>Wed, 14 Nov 2018 13:49:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-take-LastValue-data-only-for-certain-range/m-p/1506292#M600612</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-11-14T13:49:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to take LastValue data only for certain range</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-take-LastValue-data-only-for-certain-range/m-p/1506298#M600613</link>
      <description>&lt;P&gt;Try this out:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LastValue_Temp:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;LOAD &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;CDHDR_KEY,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;SPAN&gt;PO_Appr.Date_TMP,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;If(Previous(CDHDR_KEY)&amp;lt;&amp;gt;CDHDR_KEY,USERNAME) as&amp;nbsp;Last_PO_Approver_Temp&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Resident CDHDR_FINAL Order by PO_Appr.Date_TMP;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;LastValue:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;SPAN&gt;CDHDR_KEY&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; FirstSortedValue(&lt;SPAN&gt;Last_PO_Approver_Temp , PO_Appr.Date_TMP) as&amp;nbsp;Last_PO_Approver&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Resident &lt;STRONG&gt;LastValue_Temp Group By&amp;nbsp;CDHDR_KEY&lt;/STRONG&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;</description>
      <pubDate>Wed, 14 Nov 2018 13:54:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-take-LastValue-data-only-for-certain-range/m-p/1506298#M600613</guid>
      <dc:creator>Thiago_Justen_</dc:creator>
      <dc:date>2018-11-14T13:54:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to take LastValue data only for certain range</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-take-LastValue-data-only-for-certain-range/m-p/1506991#M600614</link>
      <description>&lt;P&gt;Hello, thanks a lot for your answer, but it`s not working correctly.&lt;/P&gt;&lt;P&gt;I had another option, to make flag:&lt;BR /&gt;text(TCODE&amp;amp;CHANGE_IND&amp;amp;AutoNumber(CHANGENR&amp;amp;TCODE&amp;amp;CHANGE_IND)) as FINAL_FLAG&lt;/P&gt;&lt;P&gt;And to make such formula:&lt;BR /&gt;CDHDR_TMP2:&lt;BR /&gt;load*,&lt;BR /&gt;If(If(FirstValue(Left(FINAL_FLAG,6)='ME21NU'),FINAL_FLAG-'1'),1,0) as Indicator&lt;BR /&gt;resident CDHDR_TMP;&lt;BR /&gt;drop table CDHDR_TMP;&lt;BR /&gt;But the problem that Qlik is telling that "Invalid Expression". Can you advise what`s the problem?&lt;/P&gt;&lt;P&gt;Thanks a lot&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Nov 2018 09:52:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-take-LastValue-data-only-for-certain-range/m-p/1506991#M600614</guid>
      <dc:creator>ivanaksen</dc:creator>
      <dc:date>2018-11-15T09:52:50Z</dc:date>
    </item>
  </channel>
</rss>

