<?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: Get last transaction attributes issue with FirstSortedValue in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Get-last-transaction-attributes-issue-with-FirstSortedValue/m-p/2543857#M1334673</link>
    <description>&lt;P&gt;I tried wrapping my head around the question, but couldn't quite follow. If you have an ID column, why not use that for your FirstSorted sort?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 26 Feb 2026 14:08:01 GMT</pubDate>
    <dc:creator>Or</dc:creator>
    <dc:date>2026-02-26T14:08:01Z</dc:date>
    <item>
      <title>Get last transaction attributes issue with FirstSortedValue</title>
      <link>https://community.qlik.com/t5/QlikView/Get-last-transaction-attributes-issue-with-FirstSortedValue/m-p/2543826#M1334672</link>
      <description>&lt;P&gt;Hey everyone, I’m running with this syntax, but I’ve run into a snag. A few records share the same date time, which leaves their Ref, Sales, and Narration fields showing up as null. The system does generate a Recid in the format 177980236362379.000001, but the tricky part is that the Recid values aren’t consistent one of them happens to be 177980236362379.000001. Is there another way around this? And if not, how can I make better use of the Recid field&lt;/P&gt;&lt;P&gt;Last_Transactions:&lt;BR /&gt;LOAD CustID,&lt;BR /&gt;Customer,&lt;BR /&gt;FirstSortedValue(Ref, -[DATE TIME]) as Ref,&lt;BR /&gt;FirstSortedValue(Sales, -[DATE TIME]) as Sales,&lt;BR /&gt;FirstSortedValue(Narration, -[DATE TIME]) as Narration,&lt;BR /&gt;Max([DATE TIME]) as [DATE TIME],&lt;BR /&gt;Max([Value Date]) as [Value Date]&lt;BR /&gt;RESIDENT Temp_Transactions&lt;BR /&gt;GROUP BY CustID, Customer;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Feb 2026 10:36:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-last-transaction-attributes-issue-with-FirstSortedValue/m-p/2543826#M1334672</guid>
      <dc:creator>LoKi_asterix</dc:creator>
      <dc:date>2026-02-26T10:36:56Z</dc:date>
    </item>
    <item>
      <title>Re: Get last transaction attributes issue with FirstSortedValue</title>
      <link>https://community.qlik.com/t5/QlikView/Get-last-transaction-attributes-issue-with-FirstSortedValue/m-p/2543857#M1334673</link>
      <description>&lt;P&gt;I tried wrapping my head around the question, but couldn't quite follow. If you have an ID column, why not use that for your FirstSorted sort?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Feb 2026 14:08:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-last-transaction-attributes-issue-with-FirstSortedValue/m-p/2543857#M1334673</guid>
      <dc:creator>Or</dc:creator>
      <dc:date>2026-02-26T14:08:01Z</dc:date>
    </item>
    <item>
      <title>Re: Get last transaction attributes issue with FirstSortedValue</title>
      <link>https://community.qlik.com/t5/QlikView/Get-last-transaction-attributes-issue-with-FirstSortedValue/m-p/2543863#M1334674</link>
      <description>&lt;P&gt;After presorting the dataset, I applied FirstValue(), and it returned the expected result.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Feb 2026 09:25:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-last-transaction-attributes-issue-with-FirstSortedValue/m-p/2543863#M1334674</guid>
      <dc:creator>LoKi_asterix</dc:creator>
      <dc:date>2026-02-27T09:25:42Z</dc:date>
    </item>
    <item>
      <title>Re: Get last transaction attributes issue with FirstSortedValue</title>
      <link>https://community.qlik.com/t5/QlikView/Get-last-transaction-attributes-issue-with-FirstSortedValue/m-p/2543900#M1334675</link>
      <description>&lt;P&gt;The aggregation might be outsourced - maybe in this way:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Last_Transactions:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;LOAD CustID,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Customer,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Ref,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Sales,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Narration,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[DATE TIME]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;RESIDENT Temp_Transactions;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;inner join(Last_Transactions)&lt;BR /&gt;LOAD CustID,&lt;BR /&gt;Customer,&lt;BR /&gt;Max([DATE TIME]) as [DATE TIME],&lt;BR /&gt;Max([Value Date]) as [Value Date]&lt;BR /&gt;RESIDENT Temp_Transactions&lt;BR /&gt;GROUP BY CustID, Customer;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Another approach could be to use interrecord-functions like peek() and previous() within an appropriated sorted resident-load and comparing the values from the current record against the previous ones and then flagging the records. It avoids to handle (n) aggregation tables and provides extra possibilities in regard to calculate offsets between the records and/or to accumulate them.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Feb 2026 09:26:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-last-transaction-attributes-issue-with-FirstSortedValue/m-p/2543900#M1334675</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2026-02-27T09:26:34Z</dc:date>
    </item>
  </channel>
</rss>

