<?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: Multiple conditions in the same field ( intersection) in set analysis (to analyse Covid19 impact in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Multiple-conditions-in-the-same-field-intersection-in-set/m-p/1725922#M55337</link>
    <description>&lt;P&gt;One solution in Script.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;tab1:
LOAD * INLINE [
    Contact ID, Event Status, COVID19
    1, Attended, Y
    1, Attended, N
    2, Inquired, N
    3, Mailed, N
    4, Inquired, Y
    4, Attended, Y
    5, Attended, N
];

Left Join(tab1)
LOAD [Contact ID], If(Concat(DISTINCT [Event Status])='Attended' And Concat(DISTINCT COVID19)='N', 'Y', 'N') As Flag
Resident tab1
Group By [Contact ID];&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="commQV32.PNG" style="width: 220px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/37104iE6DE24DA3F2D1CBD/image-size/large?v=v2&amp;amp;px=999" role="button" title="commQV32.PNG" alt="commQV32.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 08 Jul 2020 01:37:44 GMT</pubDate>
    <dc:creator>Saravanan_Desingh</dc:creator>
    <dc:date>2020-07-08T01:37:44Z</dc:date>
    <item>
      <title>Multiple conditions in the same field ( intersection) in set analysis (to analyse Covid19 impact)</title>
      <link>https://community.qlik.com/t5/App-Development/Multiple-conditions-in-the-same-field-intersection-in-set/m-p/1725918#M55336</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;I tried to calculate the unique number of new attendees who attended our events after Covid19 started but had not attended our events prior to&amp;nbsp; Covid19. I have created a binary variable&amp;nbsp; Covid19 (Y or N) using the event date(if date&amp;lt;15/03/2020 'N', if (date&amp;gt;=15/03/2020,'Y', null()) as COVID19.&lt;/P&gt;&lt;P&gt;Here's the set analysis I created to capture the unique number of new attendees since COVID19:&lt;/P&gt;&lt;P&gt;Count({&amp;lt;[Contact ID]= P({&amp;lt;COVID19={'Y'}&amp;gt;} [Contact ID])&amp;gt; * &amp;lt;[Contact ID] = P({&amp;lt;COVID19={'N'}&amp;gt;}[Contact ID] )&amp;gt;* &amp;lt;[Contact ID] = P({&amp;lt;[Event&amp;nbsp; Status]={'Attended'}&amp;gt;} [Contact ID])&amp;gt;} Distinct [Contact ID])&lt;/P&gt;&lt;P&gt;There's no error in the syntax, however the number from the calculation is higher than the total number of attendance since Covid19 (it should be smaller than the total). Can someone help me to identify what's wrong with my set anlaysis? Thanks a lot!&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;Nina&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jul 2020 23:10:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Multiple-conditions-in-the-same-field-intersection-in-set/m-p/1725918#M55336</guid>
      <dc:creator>aroyi</dc:creator>
      <dc:date>2020-07-08T23:10:25Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple conditions in the same field ( intersection) in set analysis (to analyse Covid19 impact</title>
      <link>https://community.qlik.com/t5/App-Development/Multiple-conditions-in-the-same-field-intersection-in-set/m-p/1725922#M55337</link>
      <description>&lt;P&gt;One solution in Script.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;tab1:
LOAD * INLINE [
    Contact ID, Event Status, COVID19
    1, Attended, Y
    1, Attended, N
    2, Inquired, N
    3, Mailed, N
    4, Inquired, Y
    4, Attended, Y
    5, Attended, N
];

Left Join(tab1)
LOAD [Contact ID], If(Concat(DISTINCT [Event Status])='Attended' And Concat(DISTINCT COVID19)='N', 'Y', 'N') As Flag
Resident tab1
Group By [Contact ID];&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="commQV32.PNG" style="width: 220px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/37104iE6DE24DA3F2D1CBD/image-size/large?v=v2&amp;amp;px=999" role="button" title="commQV32.PNG" alt="commQV32.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jul 2020 01:37:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Multiple-conditions-in-the-same-field-intersection-in-set/m-p/1725922#M55337</guid>
      <dc:creator>Saravanan_Desingh</dc:creator>
      <dc:date>2020-07-08T01:37:44Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple conditions in the same field ( intersection) in set analysis (to analyse Covid19 impact</title>
      <link>https://community.qlik.com/t5/App-Development/Multiple-conditions-in-the-same-field-intersection-in-set/m-p/1725924#M55339</link>
      <description>&lt;P&gt;From your if statement, it seems pre-covid19 is flagged Y and post-covid 19 is flagged N. If that is true, try this maybe&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Count({&amp;lt;[Contact ID] = P({&amp;lt;COVID19 = {'N'}, [Event  Status] = {'Attended'}&amp;gt;}) - p({&amp;lt;COVID19 = {'Y'}, [Event  Status] = {'Attended'}&amp;gt;})&amp;gt;} DISTINCT [Contact ID])&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 08 Jul 2020 02:54:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Multiple-conditions-in-the-same-field-intersection-in-set/m-p/1725924#M55339</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2020-07-08T02:54:22Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple conditions in the same field ( intersection) in set analysis (to analyse Covid19 impact</title>
      <link>https://community.qlik.com/t5/App-Development/Multiple-conditions-in-the-same-field-intersection-in-set/m-p/1725965#M55343</link>
      <description>&lt;P&gt;Like this?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Count({&amp;lt;[Contact ID] = E({&amp;lt;COVID19 = {'N'}, [Event Status] = {'Attended'}&amp;gt;},&lt;SPAN&gt;COVID19 = {'Y'}, [Event Status] = {'Attended'}&amp;gt;} DISTINCT [Contact ID])&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Excluding every Contact ID who attended prior, and select the ones attended after.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jul 2020 07:31:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Multiple-conditions-in-the-same-field-intersection-in-set/m-p/1725965#M55343</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2020-07-08T07:31:52Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple conditions in the same field ( intersection) in set analysis (to analyse Covid19 impact</title>
      <link>https://community.qlik.com/t5/App-Development/Multiple-conditions-in-the-same-field-intersection-in-set/m-p/1726105#M55354</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/25001"&gt;@Vegar&lt;/a&gt;&amp;nbsp; - I think you missed to close E&lt;/P&gt;&lt;P&gt;=Count({&amp;lt;[Contact ID] = E({&amp;lt;COVID19 = {'N'}, [Event Status] = {'Attended'}&amp;gt;}&lt;FONT color="#FF0000"&gt;)&lt;/FONT&gt;,COVID19 = {'Y'}, [Event Status] = {'Attended'}&amp;gt;} DISTINCT [Contact ID])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But nice learning for me &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jul 2020 13:09:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Multiple-conditions-in-the-same-field-intersection-in-set/m-p/1726105#M55354</guid>
      <dc:creator>Saravanan_Desingh</dc:creator>
      <dc:date>2020-07-08T13:09:02Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple conditions in the same field ( intersection) in set analysis (to analyse Covid19 impact</title>
      <link>https://community.qlik.com/t5/App-Development/Multiple-conditions-in-the-same-field-intersection-in-set/m-p/1726209#M55357</link>
      <description>&lt;P&gt;Thanks.&amp;nbsp; I was copy-paset-typing from my &lt;span class="lia-unicode-emoji" title=":mobile_phone:"&gt;📱&lt;/span&gt; and I must have missed the paranthesis while struggling to correct all autocorrect mistakes that came with it.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;(I would love to se QlikScript as a separate language on my mobile keyboard together with English, Swedish, Norwegian, etc.)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/22631"&gt;@aroyi&lt;/a&gt;&amp;nbsp;&lt;/EM&gt;how did it go? Have we managed to solve your issue? If so then please close this thread by marking one or more replies as the correct answer(s).&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jul 2020 17:00:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Multiple-conditions-in-the-same-field-intersection-in-set/m-p/1726209#M55357</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2020-07-08T17:00:24Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple conditions in the same field ( intersection) in set analysis (to analyse Covid19 impact</title>
      <link>https://community.qlik.com/t5/App-Development/Multiple-conditions-in-the-same-field-intersection-in-set/m-p/1726294#M55362</link>
      <description>&lt;P&gt;Thanks so much for your help everyone,&amp;nbsp; now I have learnt how to use E() and P() in nested set analysis!&lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jul 2020 23:29:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Multiple-conditions-in-the-same-field-intersection-in-set/m-p/1726294#M55362</guid>
      <dc:creator>aroyi</dc:creator>
      <dc:date>2020-07-08T23:29:07Z</dc:date>
    </item>
  </channel>
</rss>

