<?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: Discard values in QVD in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Discard-values-in-QVD/m-p/1825676#M67873</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have used First Sorted Value to take in the first iteration of a Enrollment Status by Patient ID and Enrollment Year Month. Some points to take into account for this to work is that your data would need to be sorted by Patien_ID, StartDate, Enroll_YearMonth. The Enrollment Year Month needs to be a numeric value for the FirstSortedValue to work.&lt;/P&gt;&lt;P&gt;Final:&lt;BR /&gt;Load&lt;BR /&gt;Patient_ID,&lt;BR /&gt;firstsortedvalue(distinct StartDate, Enroll_YearMonth) as StartDate,&lt;BR /&gt;[Program Name],&lt;BR /&gt;Enroll_YearMonth,&lt;BR /&gt;FirstSortedValue(distinct Enrollment_Status, Enroll_YearMonth) as Status&lt;BR /&gt;Resident temp&lt;BR /&gt;group by Patient_ID, [Program Name], Enroll_YearMonth;&lt;/P&gt;&lt;P&gt;I hope this helps.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Anthony&lt;/P&gt;</description>
    <pubDate>Fri, 30 Jul 2021 06:07:08 GMT</pubDate>
    <dc:creator>anthonyj</dc:creator>
    <dc:date>2021-07-30T06:07:08Z</dc:date>
    <item>
      <title>Discard values in QVD</title>
      <link>https://community.qlik.com/t5/App-Development/Discard-values-in-QVD/m-p/1825596#M67856</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have this data&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="julianortiz_0-1627581298694.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/59426iCFA035D1057F1449/image-size/medium?v=v2&amp;amp;px=400" role="button" title="julianortiz_0-1627581298694.png" alt="julianortiz_0-1627581298694.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;We have patients and status for a program in MonthYears&lt;/P&gt;&lt;P&gt;I am trying to discard values in Script, for example, for patient 876978, if i have more than one record in a MonthYear, i should keep only Active status, but if i only have one record per MonthYear i should keep the same status.&lt;/P&gt;&lt;P&gt;This is the result that i should have:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="julianortiz_1-1627581632544.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/59427i498FE675DA3B799C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="julianortiz_1-1627581632544.png" alt="julianortiz_1-1627581632544.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jul 2021 18:01:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Discard-values-in-QVD/m-p/1825596#M67856</guid>
      <dc:creator>julianortiz</dc:creator>
      <dc:date>2021-07-29T18:01:39Z</dc:date>
    </item>
    <item>
      <title>Re: Discard values in QVD</title>
      <link>https://community.qlik.com/t5/App-Development/Discard-values-in-QVD/m-p/1825676#M67873</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have used First Sorted Value to take in the first iteration of a Enrollment Status by Patient ID and Enrollment Year Month. Some points to take into account for this to work is that your data would need to be sorted by Patien_ID, StartDate, Enroll_YearMonth. The Enrollment Year Month needs to be a numeric value for the FirstSortedValue to work.&lt;/P&gt;&lt;P&gt;Final:&lt;BR /&gt;Load&lt;BR /&gt;Patient_ID,&lt;BR /&gt;firstsortedvalue(distinct StartDate, Enroll_YearMonth) as StartDate,&lt;BR /&gt;[Program Name],&lt;BR /&gt;Enroll_YearMonth,&lt;BR /&gt;FirstSortedValue(distinct Enrollment_Status, Enroll_YearMonth) as Status&lt;BR /&gt;Resident temp&lt;BR /&gt;group by Patient_ID, [Program Name], Enroll_YearMonth;&lt;/P&gt;&lt;P&gt;I hope this helps.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Anthony&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jul 2021 06:07:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Discard-values-in-QVD/m-p/1825676#M67873</guid>
      <dc:creator>anthonyj</dc:creator>
      <dc:date>2021-07-30T06:07:08Z</dc:date>
    </item>
    <item>
      <title>Re: Discard values in QVD</title>
      <link>https://community.qlik.com/t5/App-Development/Discard-values-in-QVD/m-p/1825704#M67877</link>
      <description>A work around can be group by Patient_ID and year-month and after take the first value from the enrollment_Status. you can group by and order by patient_id and status</description>
      <pubDate>Fri, 30 Jul 2021 08:21:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Discard-values-in-QVD/m-p/1825704#M67877</guid>
      <dc:creator>menta</dc:creator>
      <dc:date>2021-07-30T08:21:19Z</dc:date>
    </item>
  </channel>
</rss>

