<?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: aggr in Straight Table not giving consistent results in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/aggr-in-Straight-Table-not-giving-consistent-results/m-p/1737131#M56384</link>
    <description>&lt;P&gt;Of course, FirstSortedValue! How did I forget that.&lt;/P&gt;&lt;P&gt;I was so wrapped up thinking I needed an aggr that I forgot about functions like these.&lt;/P&gt;&lt;P&gt;Thank you &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 19 Aug 2020 14:59:43 GMT</pubDate>
    <dc:creator>tracysmart</dc:creator>
    <dc:date>2020-08-19T14:59:43Z</dc:date>
    <item>
      <title>aggr in Straight Table not giving consistent results</title>
      <link>https://community.qlik.com/t5/App-Development/aggr-in-Straight-Table-not-giving-consistent-results/m-p/1737043#M56367</link>
      <description>&lt;P&gt;I am struggling to see why my Aggr column is not giving consistent results.&lt;/P&gt;&lt;P&gt;I have the following fields&lt;/P&gt;&lt;P&gt;IncidentReference,&lt;/P&gt;&lt;P&gt;Claim_Date_Transaction_Created,&lt;/P&gt;&lt;P&gt;Claim_Trans_Authorisation_Status,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Claim_Net&lt;/P&gt;&lt;P&gt;I want to return the Claim_Net value where the Claim_Date_Transaction_Created is the maximum (per Incident reference based on certain Status)&lt;/P&gt;&lt;P&gt;I have used this expression, which works for the most part.&amp;nbsp;&lt;/P&gt;&lt;P&gt;if(Date(floor(Claim_Date_Transaction_Created),'DD/MM/YYYY')=date(floor(Aggr(Max({&amp;lt;Claim_Trans_Authorisation_Status={'Approved', 'Approved Direct Payment'}&amp;gt;}Claim_Date_Transaction_Created),IncidentReference)),'DD/MM/YYYY')&lt;BR /&gt;,Claim_Net,0)&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I have also tried using just an aggr expression without the IF statement but again, cant seem to get the expression quite right&lt;/P&gt;&lt;P&gt;The attached spreadsheet shows the resulting straight table, but in some cases I get a zero (highlighted in red) and I cant understand why this might be?&lt;/P&gt;</description>
      <pubDate>Tue, 21 Dec 2021 21:48:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/aggr-in-Straight-Table-not-giving-consistent-results/m-p/1737043#M56367</guid>
      <dc:creator>tracysmart</dc:creator>
      <dc:date>2021-12-21T21:48:24Z</dc:date>
    </item>
    <item>
      <title>Re: aggr in Straight Table not giving consistent results</title>
      <link>https://community.qlik.com/t5/App-Development/aggr-in-Straight-Table-not-giving-consistent-results/m-p/1737085#M56376</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;you can try this expression&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;if(Claim_Date_Transaction_Created= max({&amp;lt;Claim_Trans_Authorisation_Status={'Approved', 'Approved Direct Payment'}&amp;gt;}total &amp;lt;IncidentReference&amp;gt; Claim_Date_Transaction_Created),Claim_Net,0)&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 19 Aug 2020 13:39:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/aggr-in-Straight-Table-not-giving-consistent-results/m-p/1737085#M56376</guid>
      <dc:creator>lironbaram</dc:creator>
      <dc:date>2020-08-19T13:39:40Z</dc:date>
    </item>
    <item>
      <title>Re: aggr in Straight Table not giving consistent results</title>
      <link>https://community.qlik.com/t5/App-Development/aggr-in-Straight-Table-not-giving-consistent-results/m-p/1737109#M56379</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;thank you for this, this works perfectly.&lt;/P&gt;&lt;P&gt;Using your solution, I am trying to add to a table that has just one row per IncidentReference, so no individual dates or values are in this. I cant use the if statement as that wont evaluate. I have converted to set analysis below;&lt;/P&gt;&lt;P&gt;This works when I have an IncidentReference selected but not when I dont?&lt;/P&gt;&lt;P&gt;sum({&amp;lt;Claim_Date_Transaction_Created={"$(=Date(Max({&amp;lt;Claim_Trans_Authorisation_Status={'Approved', 'Approved Direct Payment'}&amp;gt;}total &amp;lt;IncidentReference&amp;gt; Claim_Date_Transaction_Created),'DD/MM/YYYY'))"}&amp;gt;}Claim_Net)&lt;/P&gt;&lt;P&gt;I must be missing something else?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Aug 2020 14:26:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/aggr-in-Straight-Table-not-giving-consistent-results/m-p/1737109#M56379</guid>
      <dc:creator>tracysmart</dc:creator>
      <dc:date>2020-08-19T14:26:17Z</dc:date>
    </item>
    <item>
      <title>Re: aggr in Straight Table not giving consistent results</title>
      <link>https://community.qlik.com/t5/App-Development/aggr-in-Straight-Table-not-giving-consistent-results/m-p/1737116#M56380</link>
      <description>&lt;P&gt;if&amp;nbsp;&lt;/P&gt;&lt;P&gt;that case&amp;nbsp; assuming your table has incident reference as only dimension&amp;nbsp;&lt;BR /&gt;use this expression :&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;FirstSortedValue({&amp;lt;Claim_Trans_Authorisation_Status={'Approved', 'Approved Direct Payment'}&amp;gt;}Claim_Net,-Claim_Date_Transaction_Created)&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 19 Aug 2020 14:42:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/aggr-in-Straight-Table-not-giving-consistent-results/m-p/1737116#M56380</guid>
      <dc:creator>lironbaram</dc:creator>
      <dc:date>2020-08-19T14:42:55Z</dc:date>
    </item>
    <item>
      <title>Re: aggr in Straight Table not giving consistent results</title>
      <link>https://community.qlik.com/t5/App-Development/aggr-in-Straight-Table-not-giving-consistent-results/m-p/1737131#M56384</link>
      <description>&lt;P&gt;Of course, FirstSortedValue! How did I forget that.&lt;/P&gt;&lt;P&gt;I was so wrapped up thinking I needed an aggr that I forgot about functions like these.&lt;/P&gt;&lt;P&gt;Thank you &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Aug 2020 14:59:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/aggr-in-Straight-Table-not-giving-consistent-results/m-p/1737131#M56384</guid>
      <dc:creator>tracysmart</dc:creator>
      <dc:date>2020-08-19T14:59:43Z</dc:date>
    </item>
  </channel>
</rss>

