<?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 Sorting problem with last and before in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Sorting-problem-with-last-and-before/m-p/316148#M1201526</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I am calculating the $ Change column with this expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;=(before( sum(Balance), 1 ) - sum(Balance))&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Now the problem is, I want to sort this in ascending order, basically find out which account has the most declined balance.&lt;/P&gt;&lt;P&gt;I tried the following expressions for sorting but both do not seem to be working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;=(before( sum(Balance), 1 ) - sum(Balance))&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;=last( (before( sum(Balance), 1 ) - sum(Balance)))&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Has anyone had any luck getting this working before?&lt;/P&gt;&lt;P&gt;&lt;IMG alt="error loading image" class="jive-image error-loading-image" src="https://community.qlik.com/legacyfs/online/-3935_sourceID:3935" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 25 Mar 2011 03:06:53 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-03-25T03:06:53Z</dc:date>
    <item>
      <title>Sorting problem with last and before</title>
      <link>https://community.qlik.com/t5/QlikView/Sorting-problem-with-last-and-before/m-p/316148#M1201526</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I am calculating the $ Change column with this expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;=(before( sum(Balance), 1 ) - sum(Balance))&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Now the problem is, I want to sort this in ascending order, basically find out which account has the most declined balance.&lt;/P&gt;&lt;P&gt;I tried the following expressions for sorting but both do not seem to be working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;=(before( sum(Balance), 1 ) - sum(Balance))&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;=last( (before( sum(Balance), 1 ) - sum(Balance)))&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Has anyone had any luck getting this working before?&lt;/P&gt;&lt;P&gt;&lt;IMG alt="error loading image" class="jive-image error-loading-image" src="https://community.qlik.com/legacyfs/online/-3935_sourceID:3935" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Mar 2011 03:06:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sorting-problem-with-last-and-before/m-p/316148#M1201526</guid>
      <dc:creator />
      <dc:date>2011-03-25T03:06:53Z</dc:date>
    </item>
  </channel>
</rss>

