<?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 More than one conditions(AND) from the same field in set analysis in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/More-than-one-conditions-AND-from-the-same-field-in-set-analysis/m-p/1601616#M44524</link>
    <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;I have patient admission data with all patients admission in a hospital,&amp;nbsp; each row represent an admission of a patient, with multiple columns(dimension) recording information about the patient. There's a column&amp;nbsp; named "treatment status" , it has 3 values: Start, progress, discharge. A patient can has one or multiple admissions(rows), with different treatment status each admission. I need to count&amp;nbsp; patients with treatment status has both "start" and "discharge". Here's my script:&lt;/P&gt;&lt;P&gt;Count({&amp;lt;TreatmentStage={"Start"}&amp;gt;*&amp;lt;TreatmentStage={"Discharge"}&amp;gt;}Distinct[ID])&lt;/P&gt;&lt;P&gt;The script shows no errors I get&amp;nbsp; 0 count. Can you please tell me what's wrong? Thanks a lot!&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 20:28:19 GMT</pubDate>
    <dc:creator>aroyi</dc:creator>
    <dc:date>2024-11-16T20:28:19Z</dc:date>
    <item>
      <title>More than one conditions(AND) from the same field in set analysis</title>
      <link>https://community.qlik.com/t5/App-Development/More-than-one-conditions-AND-from-the-same-field-in-set-analysis/m-p/1601616#M44524</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;I have patient admission data with all patients admission in a hospital,&amp;nbsp; each row represent an admission of a patient, with multiple columns(dimension) recording information about the patient. There's a column&amp;nbsp; named "treatment status" , it has 3 values: Start, progress, discharge. A patient can has one or multiple admissions(rows), with different treatment status each admission. I need to count&amp;nbsp; patients with treatment status has both "start" and "discharge". Here's my script:&lt;/P&gt;&lt;P&gt;Count({&amp;lt;TreatmentStage={"Start"}&amp;gt;*&amp;lt;TreatmentStage={"Discharge"}&amp;gt;}Distinct[ID])&lt;/P&gt;&lt;P&gt;The script shows no errors I get&amp;nbsp; 0 count. Can you please tell me what's wrong? Thanks a lot!&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 20:28:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/More-than-one-conditions-AND-from-the-same-field-in-set-analysis/m-p/1601616#M44524</guid>
      <dc:creator>aroyi</dc:creator>
      <dc:date>2024-11-16T20:28:19Z</dc:date>
    </item>
    <item>
      <title>Re: More than one conditions(AND) from the same field in set analysis</title>
      <link>https://community.qlik.com/t5/App-Development/More-than-one-conditions-AND-from-the-same-field-in-set-analysis/m-p/1601639#M44529</link>
      <description>&lt;P&gt;Intersection is the right idea, but Your expression will return single lines with both values - impossible, so no results. You need to compare possibles with the P() operator&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Count({&amp;lt;ID = P({&amp;lt;TreatmentStage={'Start'}&amp;gt;} ID)&amp;gt; * &amp;lt;ID = P({&amp;lt;TreatmentStage={'Discharge'}&amp;gt;} ID)&amp;gt;} Distinct ID)&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jul 2019 05:41:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/More-than-one-conditions-AND-from-the-same-field-in-set-analysis/m-p/1601639#M44529</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2019-07-12T05:41:19Z</dc:date>
    </item>
    <item>
      <title>Re: More than one conditions(AND) from the same field in set analysis</title>
      <link>https://community.qlik.com/t5/App-Development/More-than-one-conditions-AND-from-the-same-field-in-set-analysis/m-p/1601640#M44530</link>
      <description>&lt;P&gt;The formula below will count each unique ID that has both a Start and Discharge record. (Check the case of my values and yours to ensure they're the same.)&lt;/P&gt;&lt;P&gt;Sum(Aggr(If(Count({&amp;lt; &lt;SPAN&gt;TreatmentStage&lt;/SPAN&gt;= {"Start","Discharge"} &amp;gt;} &lt;SPAN&gt;TreatmentStage&lt;/SPAN&gt;) &amp;gt; 1, 1, 0), &lt;SPAN&gt;ID&lt;/SPAN&gt;))&lt;/P&gt;&lt;P&gt;Let me know if this works for you.&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jul 2019 05:49:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/More-than-one-conditions-AND-from-the-same-field-in-set-analysis/m-p/1601640#M44530</guid>
      <dc:creator>lblumenfeld</dc:creator>
      <dc:date>2019-07-12T05:49:19Z</dc:date>
    </item>
    <item>
      <title>Re: More than one conditions(AND) from the same field in set analysis</title>
      <link>https://community.qlik.com/t5/App-Development/More-than-one-conditions-AND-from-the-same-field-in-set-analysis/m-p/1601643#M44531</link>
      <description>&lt;P&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-MVP lia-component-message-view-widget-author-username"&gt;&lt;SPAN class="login-bold"&gt;Many thanks for your help,it's solved!&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-MVP lia-component-message-view-widget-author-username"&gt;&lt;A href="https://community.qlik.com/t5/user/viewprofilepage/user-id/14931" target="_self"&gt;&lt;SPAN class="login-bold"&gt;jontydkpi&lt;/SPAN&gt;&lt;/A&gt; &lt;/SPAN&gt;-Your script gets the correct total-24.&lt;/P&gt;&lt;P&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Contributor lia-component-message-view-widget-author-username"&gt;&lt;A href="https://community.qlik.com/t5/user/viewprofilepage/user-id/630" target="_self"&gt;&lt;SPAN class=""&gt;lblumenfeld&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt;-Your script gets total of 36-not sure what went wrong.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jul 2019 06:15:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/More-than-one-conditions-AND-from-the-same-field-in-set-analysis/m-p/1601643#M44531</guid>
      <dc:creator>aroyi</dc:creator>
      <dc:date>2019-07-12T06:15:39Z</dc:date>
    </item>
  </channel>
</rss>

