<?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: Filter records by surveillance data. in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Filter-records-by-surveillance-data/m-p/2457181#M98547</link>
    <description>&lt;P&gt;Hi, You can achieve this by using the FirstSortedValue function. This function returns the first sorted value of an expression, sorted by another expression.&lt;/P&gt;
&lt;P&gt;try this&lt;/P&gt;
&lt;P&gt;Load&lt;BR /&gt;Company,&lt;BR /&gt;Sector,&lt;BR /&gt;FirstSortedValue(Effective_date, -Effective_date) as Effective_date,&lt;BR /&gt;FirstSortedValue(Cost_center, -Effective_date) as Cost_center&lt;BR /&gt;Resident YourTable&lt;BR /&gt;Where Effective_date &amp;lt;= YourFilterDate&lt;BR /&gt;Group By Company, Sector;&lt;/P&gt;
&lt;P&gt;In this script, replace YourTable with the name of your table and YourFilterDate with the date you have as a filter.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please replace the field names with your actual field names if they are different. This script should give you a new table with filtered records as per your requirement.&lt;/P&gt;
&lt;P&gt;I hope this helps!&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 28 May 2024 19:08:12 GMT</pubDate>
    <dc:creator>Sayed_Mannan</dc:creator>
    <dc:date>2024-05-28T19:08:12Z</dc:date>
    <item>
      <title>Filter records by surveillance data.</title>
      <link>https://community.qlik.com/t5/App-Development/Filter-records-by-surveillance-data/m-p/2456996#M98542</link>
      <description>&lt;P&gt;Hey guys.&lt;/P&gt;
&lt;P&gt;I have this structure:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE border="1" width="44.442907053166834%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="16.666666666666668%"&gt;&lt;FONT face="courier new,courier"&gt;Company&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD width="16.666666666666668%"&gt;&lt;FONT face="courier new,courier"&gt;Sector&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD width="8.333333333333334%"&gt;&lt;FONT face="courier new,courier"&gt;Effective date&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD width="8.333333333333334%"&gt;&lt;FONT face="courier new,courier"&gt;Cost center&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="16.666666666666668%"&gt;&lt;FONT face="courier new,courier"&gt;1&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD width="16.666666666666668%"&gt;&lt;FONT face="courier new,courier"&gt;8&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD width="8.333333333333334%"&gt;&lt;FONT face="courier new,courier"&gt;01/05/2024&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD width="8.333333333333334%"&gt;&lt;FONT face="courier new,courier"&gt;2569&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="16.666666666666668%"&gt;&lt;FONT face="courier new,courier"&gt;1&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD width="16.666666666666668%"&gt;&lt;FONT face="courier new,courier"&gt;8&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD width="8.333333333333334%"&gt;&lt;FONT face="courier new,courier"&gt;01/10/2023&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD width="8.333333333333334%"&gt;&lt;FONT face="courier new,courier"&gt;2545&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="16.666666666666668%"&gt;&lt;FONT face="courier new,courier"&gt;1&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD width="16.666666666666668%"&gt;&lt;FONT face="courier new,courier"&gt;7&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD width="8.333333333333334%"&gt;&lt;FONT face="courier new,courier"&gt;01/04/2024&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD width="8.333333333333334%"&gt;&lt;FONT face="courier new,courier"&gt;6352&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="16.666666666666668%"&gt;&lt;FONT face="courier new,courier"&gt;1&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD width="16.666666666666668%"&gt;&lt;FONT face="courier new,courier"&gt;6&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD width="8.333333333333334%"&gt;&lt;FONT face="courier new,courier"&gt;01/01/2024&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD width="8.333333333333334%"&gt;&lt;FONT face="courier new,courier"&gt;3665&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="16.666666666666668%"&gt;&lt;FONT face="courier new,courier"&gt;1&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD width="16.666666666666668%"&gt;&lt;FONT face="courier new,courier"&gt;6&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD width="8.333333333333334%"&gt;&lt;FONT face="courier new,courier"&gt;01/11/2023&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD width="8.333333333333334%"&gt;&lt;FONT face="courier new,courier"&gt;3645&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="16.666666666666668%"&gt;&lt;FONT face="courier new,courier"&gt;1&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD width="16.666666666666668%"&gt;&lt;FONT face="courier new,courier"&gt;6&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD width="8.333333333333334%"&gt;&lt;FONT face="courier new,courier"&gt;01/10/2023&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD width="8.333333333333334%"&gt;&lt;FONT face="courier new,courier"&gt;3609&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have the effective date as a filter.&lt;/P&gt;
&lt;P&gt;I need to set up a dashboard with records with a date less than or equal to the filter's effective date, returning only 1 record per key (company,sector).&lt;/P&gt;
&lt;P&gt;I've already searched on several forums, but I can't find a solution. &lt;BR /&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 28 May 2024 14:07:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Filter-records-by-surveillance-data/m-p/2456996#M98542</guid>
      <dc:creator>mpcastro</dc:creator>
      <dc:date>2024-05-28T14:07:59Z</dc:date>
    </item>
    <item>
      <title>Re: Filter records by surveillance data.</title>
      <link>https://community.qlik.com/t5/App-Development/Filter-records-by-surveillance-data/m-p/2457181#M98547</link>
      <description>&lt;P&gt;Hi, You can achieve this by using the FirstSortedValue function. This function returns the first sorted value of an expression, sorted by another expression.&lt;/P&gt;
&lt;P&gt;try this&lt;/P&gt;
&lt;P&gt;Load&lt;BR /&gt;Company,&lt;BR /&gt;Sector,&lt;BR /&gt;FirstSortedValue(Effective_date, -Effective_date) as Effective_date,&lt;BR /&gt;FirstSortedValue(Cost_center, -Effective_date) as Cost_center&lt;BR /&gt;Resident YourTable&lt;BR /&gt;Where Effective_date &amp;lt;= YourFilterDate&lt;BR /&gt;Group By Company, Sector;&lt;/P&gt;
&lt;P&gt;In this script, replace YourTable with the name of your table and YourFilterDate with the date you have as a filter.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please replace the field names with your actual field names if they are different. This script should give you a new table with filtered records as per your requirement.&lt;/P&gt;
&lt;P&gt;I hope this helps!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 May 2024 19:08:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Filter-records-by-surveillance-data/m-p/2457181#M98547</guid>
      <dc:creator>Sayed_Mannan</dc:creator>
      <dc:date>2024-05-28T19:08:12Z</dc:date>
    </item>
  </channel>
</rss>

