<?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 Set Analysis OR logic Issue in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-OR-logic-Issue/m-p/1193029#M875793</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here are 2 set analysis statements that individually try to count the number of unique emails for the previous 2 years based on a certain date...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Col 2&lt;/P&gt;&lt;P&gt;=Count(DISTINCT{$&amp;lt;[Final 1st Party Email Opt In]={'IN'},[Email Exclusions]={'OK'},[Email Status]={'Good'},[FinalRecencyDate]={"&amp;gt;=$(=Today()-730)"}&amp;gt;}Email)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Col 3&lt;/P&gt;&lt;P&gt;=Count(DISTINCT{$&amp;lt;[Final 1st Party Email Opt In]={'IN'},[Email Exclusions]={'OK'},[Email Status]={'Good'},[Registration Date]={"&amp;gt;=$(=Today()-730)"}&amp;gt;}Email)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The 4th column is a failed attempt to combine the 2 statements into one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So for example if an email has either a Registration Date OR FinalRecencyDate within the last 2 years then it should count as 1 and show in the 4th column.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Col 4&lt;/P&gt;&lt;P&gt;=Count(DISTINCT{$&lt;/P&gt;&lt;P&gt;&amp;lt;[Final 1st Party Email Opt In]={'IN'},[Email Exclusions]={'OK'},[Email Status]={'Good'},[Registration Date]={"&amp;gt;=$(=Today()-730)"}&amp;gt;+&lt;/P&gt;&lt;P&gt;&amp;lt;[Final 1st Party Email Opt In]={'IN'},[Email Exclusions]={'OK'},[Email Status]={'Good'},[FinalRecencyDate]={"&amp;gt;=$(=Today()-730)"}&amp;gt;&lt;/P&gt;&lt;P&gt;}Email)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am seem to be getting sporadic results - i would have thought that if either column 2 or 3 has 1 in it then column 4 should too but some are showing zero ?&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Set Analysis Issue.png" class="jive-image image-1" src="/legacyfs/online/141870_Set Analysis Issue.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;Any ideas where i'm going wrong appreciated - maybe there's a better way to do it altogether?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
    <dc:creator>haymarketpaul</dc:creator>
    <dc:date>2020-11-25T16:16:04Z</dc:date>
    <item>
      <title>Set Analysis OR logic Issue</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-OR-logic-Issue/m-p/1193029#M875793</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here are 2 set analysis statements that individually try to count the number of unique emails for the previous 2 years based on a certain date...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Col 2&lt;/P&gt;&lt;P&gt;=Count(DISTINCT{$&amp;lt;[Final 1st Party Email Opt In]={'IN'},[Email Exclusions]={'OK'},[Email Status]={'Good'},[FinalRecencyDate]={"&amp;gt;=$(=Today()-730)"}&amp;gt;}Email)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Col 3&lt;/P&gt;&lt;P&gt;=Count(DISTINCT{$&amp;lt;[Final 1st Party Email Opt In]={'IN'},[Email Exclusions]={'OK'},[Email Status]={'Good'},[Registration Date]={"&amp;gt;=$(=Today()-730)"}&amp;gt;}Email)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The 4th column is a failed attempt to combine the 2 statements into one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So for example if an email has either a Registration Date OR FinalRecencyDate within the last 2 years then it should count as 1 and show in the 4th column.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Col 4&lt;/P&gt;&lt;P&gt;=Count(DISTINCT{$&lt;/P&gt;&lt;P&gt;&amp;lt;[Final 1st Party Email Opt In]={'IN'},[Email Exclusions]={'OK'},[Email Status]={'Good'},[Registration Date]={"&amp;gt;=$(=Today()-730)"}&amp;gt;+&lt;/P&gt;&lt;P&gt;&amp;lt;[Final 1st Party Email Opt In]={'IN'},[Email Exclusions]={'OK'},[Email Status]={'Good'},[FinalRecencyDate]={"&amp;gt;=$(=Today()-730)"}&amp;gt;&lt;/P&gt;&lt;P&gt;}Email)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am seem to be getting sporadic results - i would have thought that if either column 2 or 3 has 1 in it then column 4 should too but some are showing zero ?&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Set Analysis Issue.png" class="jive-image image-1" src="/legacyfs/online/141870_Set Analysis Issue.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;Any ideas where i'm going wrong appreciated - maybe there's a better way to do it altogether?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-OR-logic-Issue/m-p/1193029#M875793</guid>
      <dc:creator>haymarketpaul</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis OR logic Issue</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-OR-logic-Issue/m-p/1193030#M875794</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;=Count(DISTINCT{$&lt;/STRONG&gt;&lt;STRONG&gt;&amp;lt;&lt;/STRONG&gt;&lt;STRONG&gt;&lt;SPAN&gt;&lt;SPAN style="color: #ff0000;"&gt;Email =&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;&lt;SPAN style="color: #ff0000;"&gt;p({&amp;lt;&lt;/SPAN&gt;[Final 1st Party Email Opt In]={'IN'},[Email Exclusions]={'OK'},[Email Status]={'Good'},[Registration Date]={"&amp;gt;=$(=Today()-730)"}&amp;gt;&lt;SPAN style="color: #ff0000;"&gt;})&lt;/SPAN&gt; +&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;&lt;SPAN style="color: #ff0000;"&gt;p({&amp;lt;&lt;/SPAN&gt;[Final 1st Party Email Opt In]={'IN'},[Email Exclusions]={'OK'},[Email Status]={'Good'},[FinalRecencyDate]={"&amp;gt;=$(=Today()-730)"}&amp;gt;}&lt;SPAN style="color: #ff0000;"&gt;)&amp;gt;}&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;Email)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Oct 2016 15:06:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-OR-logic-Issue/m-p/1193030#M875794</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-10-25T15:06:44Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis OR logic Issue</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-OR-logic-Issue/m-p/1193031#M875795</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks again Sunny&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That seems to do the trick - have got some other dates to add in too so hopefully that will crack it&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Oct 2016 15:18:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-OR-logic-Issue/m-p/1193031#M875795</guid>
      <dc:creator>haymarketpaul</dc:creator>
      <dc:date>2016-10-25T15:18:42Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis OR logic Issue</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-OR-logic-Issue/m-p/1193032#M875796</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Following gives you only common values&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Count&lt;SPAN style="font-size: 20.0pt;"&gt;(&lt;/SPAN&gt;DISTINCT&lt;/P&gt;&lt;P&gt;{$&amp;lt;[Final 1st Party Email Opt In]={'IN'},[Email Exclusions]={'OK'},[Email Status]={'Good'},[FinalRecencyDate]={"&amp;gt;=$(=Today()-730)"}&amp;gt; &lt;SPAN style="font-size: 14.0pt; color: red;"&gt;+ &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &amp;lt;[FinalRecencyDate]={"&amp;gt;=$(=Today()-730)"}&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Email&lt;SPAN style="font-size: 22.0pt;"&gt;) as column4&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 22.0pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 22.0pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 29.3333339691162px;"&gt;Following&lt;/SPAN&gt;&lt;SPAN style="font-size: 22.0pt;"&gt; gives you conditional "1" &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 22.0pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 22.0pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;if&lt;SPAN style="font-size: 20.0pt;"&gt;(&lt;/SPAN&gt;Count(DISTINCT{$&amp;lt;[Final 1st Party Email Opt In]={'IN'},[Email Exclusions]={'OK'},[Email Status]={'Good'&lt;STRONG&gt;},[FinalRecencyDate]={"&amp;gt;=$(=Today()-730)"}&amp;gt;}&lt;/STRONG&gt;Email))&amp;gt;=1 &lt;SPAN style="font-size: 20.0pt;"&gt;or &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;if(Count(DISTINCT{$&amp;lt;[Final 1st Party Email Opt In]={'IN'},[Email Exclusions]={'OK'},[Email Status]={'Good'},[&lt;STRONG&gt;Registration Date]={"&amp;gt;=$(=Today()-730)"}&amp;gt;}&lt;/STRONG&gt;Email))&amp;gt;=1 , 1 , 0&lt;SPAN style="font-size: 20.0pt;"&gt;)&lt;/SPAN&gt;&amp;nbsp; as Column4&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 22.0pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Oct 2016 15:19:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-OR-logic-Issue/m-p/1193032#M875796</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-10-25T15:19:08Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis OR logic Issue</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-OR-logic-Issue/m-p/1193033#M875797</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Follow the same p() logic and you should be fine &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Oct 2016 15:21:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-OR-logic-Issue/m-p/1193033#M875797</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-10-25T15:21:08Z</dc:date>
    </item>
  </channel>
</rss>

