<?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: Count based on newest entry for a specific field in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Count-based-on-newest-entry-for-a-specific-field/m-p/2160260#M94101</link>
    <description>&lt;P&gt;Can you provide a sample?&lt;/P&gt;</description>
    <pubDate>Wed, 10 Jan 2024 23:05:30 GMT</pubDate>
    <dc:creator>pedrohenriqueperna</dc:creator>
    <dc:date>2024-01-10T23:05:30Z</dc:date>
    <item>
      <title>Count based on newest entry for a specific field</title>
      <link>https://community.qlik.com/t5/App-Development/Count-based-on-newest-entry-for-a-specific-field/m-p/2160205#M94097</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to see if it is possible to create a formula for a KPI which shows the count of how many items are have a chosen status based on the newest entry per item.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So we have lots of items with serial numbers that go out to customers and are returned to inventory. the table created by entries in the ERP has a new record created each time it's either delivered to a customer or received back in to inventory.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've tried some max date formulas but that just gives me the newest date total, but what I need it to do it find the max date PER SERIAL NUMBER and tell me the status of it.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So I'm looking for a way that will count how many serial numbers have a status of "Issued" based on the last record entered for that serial number. If part A's last updated record is yesterday, part B's was one week ago, and part C's was a year ago, it needs to count each of those newest entries regardless of when the Max date is.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2024 18:28:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Count-based-on-newest-entry-for-a-specific-field/m-p/2160205#M94097</guid>
      <dc:creator>jalanhart</dc:creator>
      <dc:date>2024-01-10T18:28:13Z</dc:date>
    </item>
    <item>
      <title>Re: Count based on newest entry for a specific field</title>
      <link>https://community.qlik.com/t5/App-Development/Count-based-on-newest-entry-for-a-specific-field/m-p/2160231#M94099</link>
      <description>&lt;P&gt;Hi, &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/244105"&gt;@jalanhart&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It seems to me that you need to aggregate the count by serial number, something like:&lt;/P&gt;
&lt;P&gt;Sum(Aggr(Count(Distinct {&amp;lt;status = {'Issued'}, status_date = {"$(=Max(status_date))"}&amp;gt;} serial_number), serial_number))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Basically, if you look for the max status date only, it will give you the max status date present in your data model, so you must aggregate by ID to look for the values individually&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2024 20:03:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Count-based-on-newest-entry-for-a-specific-field/m-p/2160231#M94099</guid>
      <dc:creator>pedrohenriqueperna</dc:creator>
      <dc:date>2024-01-10T20:03:01Z</dc:date>
    </item>
    <item>
      <title>Re: Count based on newest entry for a specific field</title>
      <link>https://community.qlik.com/t5/App-Development/Count-based-on-newest-entry-for-a-specific-field/m-p/2160247#M94100</link>
      <description>&lt;P&gt;Thanks for the help. Not quite working for me. it's still giving me only one record for the max date, and the filter for Status is not working right either. I've attached a photo drilling down to one customer for example, and it should give me a count of 21 but instead it's just 3.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jalanhart_0-1704919814936.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/126849iF2806CF9C365A789/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jalanhart_0-1704919814936.png" alt="jalanhart_0-1704919814936.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2024 20:51:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Count-based-on-newest-entry-for-a-specific-field/m-p/2160247#M94100</guid>
      <dc:creator>jalanhart</dc:creator>
      <dc:date>2024-01-10T20:51:59Z</dc:date>
    </item>
    <item>
      <title>Re: Count based on newest entry for a specific field</title>
      <link>https://community.qlik.com/t5/App-Development/Count-based-on-newest-entry-for-a-specific-field/m-p/2160260#M94101</link>
      <description>&lt;P&gt;Can you provide a sample?&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2024 23:05:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Count-based-on-newest-entry-for-a-specific-field/m-p/2160260#M94101</guid>
      <dc:creator>pedrohenriqueperna</dc:creator>
      <dc:date>2024-01-10T23:05:30Z</dc:date>
    </item>
    <item>
      <title>Re: Count based on newest entry for a specific field</title>
      <link>https://community.qlik.com/t5/App-Development/Count-based-on-newest-entry-for-a-specific-field/m-p/2160266#M94102</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;
&lt;P&gt;Count(DISTINCT {&amp;lt;serial_number = {"=Max(status_date) = Max({&amp;lt;status= {'Issued'}&amp;gt;} status_date)"}&amp;gt;} serial_number )&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2024 23:26:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Count-based-on-newest-entry-for-a-specific-field/m-p/2160266#M94102</guid>
      <dc:creator>pedrohenriqueperna</dc:creator>
      <dc:date>2024-01-10T23:26:42Z</dc:date>
    </item>
  </channel>
</rss>

