<?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: filtering current FYTD numbers in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/filtering-current-FYTD-numbers/m-p/1675529#M51331</link>
    <description>&lt;P&gt;Ok. unfortunately set analysis doesn't work that way.&lt;/P&gt;&lt;P&gt;there maybe a round about way to do this with expression but i feel easiest and best in terms of performance maybe to mark each new patient with a flag.&lt;/P&gt;&lt;P&gt;e.g. rough code below&lt;/P&gt;&lt;P&gt;&lt;EM&gt;PatientDetailsTable:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;load&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;patientid,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; admissiondate,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; dummycolumn&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;from source;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;left join (PatientDetailsTable)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;load min(admissiondate) as admissiondate , patientid,&amp;nbsp; 1 as firstadmissionflag&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;from source groupby patientid&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;this way each first admitted row will be marked with&amp;nbsp;firstadmissionflag as 1.&lt;/P&gt;&lt;P&gt;use that in your set analysis along with currentfyflag&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 13 Feb 2020 19:44:51 GMT</pubDate>
    <dc:creator>dplr-rn</dc:creator>
    <dc:date>2020-02-13T19:44:51Z</dc:date>
    <item>
      <title>filtering current FYTD numbers</title>
      <link>https://community.qlik.com/t5/App-Development/filtering-current-FYTD-numbers/m-p/1675484#M51316</link>
      <description>&lt;P&gt;I have a data set with four fiscal years. I need two KPIs, one with new patients and the other with returning patients.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I began with creating a fiscal calendar with flags for currentFY. To get new patients I used the count(distinct(PatientID)) which gave me the number instances new patients came into the hospital system through all the four years.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now I need to filter out the new patients for the currentFY.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using:&amp;nbsp;&lt;/P&gt;&lt;P&gt;count({$&amp;lt;currentFYFlag={'1'}&amp;gt;}distinct(PatientID))&lt;/P&gt;&lt;P&gt;I am getting a number. But I am not sure if the set analysis is&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;first filtering the data to the current year and then finding the count of distinct patientIDs &lt;/STRONG&gt;(i don't want this)&amp;nbsp;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;first getting the distinct patientIDs and then filtering to the current year &lt;/STRONG&gt;(this is what I need).&lt;/P&gt;</description>
      <pubDate>Thu, 13 Feb 2020 18:17:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/filtering-current-FYTD-numbers/m-p/1675484#M51316</guid>
      <dc:creator>sharasridhar</dc:creator>
      <dc:date>2020-02-13T18:17:39Z</dc:date>
    </item>
    <item>
      <title>Re: filtering current FYTD numbers</title>
      <link>https://community.qlik.com/t5/App-Development/filtering-current-FYTD-numbers/m-p/1675499#M51324</link>
      <description>&lt;P&gt;set analysis is&amp;nbsp;first filtering the data to the current year .&lt;/P&gt;&lt;P&gt;I dont see how numbers would be different. maybe you can elaborate with sample data and example&lt;/P&gt;</description>
      <pubDate>Thu, 13 Feb 2020 18:48:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/filtering-current-FYTD-numbers/m-p/1675499#M51324</guid>
      <dc:creator>dplr-rn</dc:creator>
      <dc:date>2020-02-13T18:48:45Z</dc:date>
    </item>
    <item>
      <title>Re: filtering current FYTD numbers</title>
      <link>https://community.qlik.com/t5/App-Development/filtering-current-FYTD-numbers/m-p/1675512#M51329</link>
      <description>&lt;P&gt;If the formula filters the unique IDs first and then by year then it would give the true unique IDs within the whole dataset.&amp;nbsp;&lt;/P&gt;&lt;P&gt;If it filters the year and then by unique IDs; this would give unique IDs only in that year. But the patient with that ID could have come the previous year. In such a case its a new entry only to that year not new to the system and I need to count the new patients entering to the system.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Feb 2020 19:19:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/filtering-current-FYTD-numbers/m-p/1675512#M51329</guid>
      <dc:creator>sharasridhar</dc:creator>
      <dc:date>2020-02-13T19:19:21Z</dc:date>
    </item>
    <item>
      <title>Re: filtering current FYTD numbers</title>
      <link>https://community.qlik.com/t5/App-Development/filtering-current-FYTD-numbers/m-p/1675529#M51331</link>
      <description>&lt;P&gt;Ok. unfortunately set analysis doesn't work that way.&lt;/P&gt;&lt;P&gt;there maybe a round about way to do this with expression but i feel easiest and best in terms of performance maybe to mark each new patient with a flag.&lt;/P&gt;&lt;P&gt;e.g. rough code below&lt;/P&gt;&lt;P&gt;&lt;EM&gt;PatientDetailsTable:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;load&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;patientid,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; admissiondate,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; dummycolumn&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;from source;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;left join (PatientDetailsTable)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;load min(admissiondate) as admissiondate , patientid,&amp;nbsp; 1 as firstadmissionflag&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;from source groupby patientid&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;this way each first admitted row will be marked with&amp;nbsp;firstadmissionflag as 1.&lt;/P&gt;&lt;P&gt;use that in your set analysis along with currentfyflag&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Feb 2020 19:44:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/filtering-current-FYTD-numbers/m-p/1675529#M51331</guid>
      <dc:creator>dplr-rn</dc:creator>
      <dc:date>2020-02-13T19:44:51Z</dc:date>
    </item>
    <item>
      <title>Re: filtering current FYTD numbers</title>
      <link>https://community.qlik.com/t5/App-Development/filtering-current-FYTD-numbers/m-p/1675534#M51332</link>
      <description>&lt;P&gt;Okay. Thank you!!&lt;/P&gt;</description>
      <pubDate>Thu, 13 Feb 2020 19:47:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/filtering-current-FYTD-numbers/m-p/1675534#M51332</guid>
      <dc:creator>sharasridhar</dc:creator>
      <dc:date>2020-02-13T19:47:32Z</dc:date>
    </item>
    <item>
      <title>Re: filtering current FYTD numbers</title>
      <link>https://community.qlik.com/t5/App-Development/filtering-current-FYTD-numbers/m-p/1675535#M51333</link>
      <description>&lt;P&gt;no problem mark as solution if it helped&lt;/P&gt;</description>
      <pubDate>Thu, 13 Feb 2020 19:48:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/filtering-current-FYTD-numbers/m-p/1675535#M51333</guid>
      <dc:creator>dplr-rn</dc:creator>
      <dc:date>2020-02-13T19:48:48Z</dc:date>
    </item>
  </channel>
</rss>

