<?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: Possible in Set Analysis to count distinct dates based on two separate fields? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Possible-in-Set-Analysis-to-count-distinct-dates-based-on-two/m-p/901791#M313655</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am afraid if i had understood your situation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but i would try writing the below expressions Also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;flag_A=1 or flag_B=1, &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;count(distinct{$}Date))&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;or&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;if( (&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;flag_A=1 and flag_B=0) or &lt;SPAN style="font-size: 13.3333330154419px;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;flag_A=0 and flag_B=1)&lt;/SPAN&gt; , &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;count(distinct{$}Date))&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;or&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Count(Distinct {$&amp;lt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;flag_A=,&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;flag_B=&lt;/SPAN&gt;&lt;/SPAN&gt; &amp;gt;} &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Date&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let me know if any of the expressions works for your situation.&lt;/P&gt;&lt;P&gt;We can proceed resolving your issue from there onwards.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;krishna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 07 Jul 2015 20:25:40 GMT</pubDate>
    <dc:creator>Qrishna</dc:creator>
    <dc:date>2015-07-07T20:25:40Z</dc:date>
    <item>
      <title>Possible in Set Analysis to count distinct dates based on two separate fields?</title>
      <link>https://community.qlik.com/t5/QlikView/Possible-in-Set-Analysis-to-count-distinct-dates-based-on-two/m-p/901789#M313653</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to count the unique [Date] values which either had [flag_A]=1 OR [flag_B]=1.&amp;nbsp; Is this possible?&lt;/P&gt;&lt;P&gt;[flag_A] and [flag_B] are independent fields on 'associated' tables, but which will never both equal 1 in the same 'record' of the tables.&amp;nbsp; (Think of it as linking table A which is activity "starts" and table B which is activity "finishes".)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Seems like an if statement works:&lt;/P&gt;&lt;P&gt;count(distinct if(flag_A=1 or flag_B=1,Date))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but I wondered if such is possible &lt;EM&gt;and &lt;/EM&gt;sensible with set analysis.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jul 2015 20:16:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Possible-in-Set-Analysis-to-count-distinct-dates-based-on-two/m-p/901789#M313653</guid>
      <dc:creator>Tyler_Waterfall</dc:creator>
      <dc:date>2015-07-07T20:16:54Z</dc:date>
    </item>
    <item>
      <title>Re: Possible in Set Analysis to count distinct dates based on two separate fields?</title>
      <link>https://community.qlik.com/t5/QlikView/Possible-in-Set-Analysis-to-count-distinct-dates-based-on-two/m-p/901790#M313654</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure if this will work, but try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;=Count(Distinct {&amp;lt;flag_A = {1}&amp;gt;+&amp;lt;flag_B = {1}&amp;gt;} Date)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jul 2015 20:21:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Possible-in-Set-Analysis-to-count-distinct-dates-based-on-two/m-p/901790#M313654</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-07-07T20:21:41Z</dc:date>
    </item>
    <item>
      <title>Re: Possible in Set Analysis to count distinct dates based on two separate fields?</title>
      <link>https://community.qlik.com/t5/QlikView/Possible-in-Set-Analysis-to-count-distinct-dates-based-on-two/m-p/901791#M313655</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am afraid if i had understood your situation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but i would try writing the below expressions Also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;flag_A=1 or flag_B=1, &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;count(distinct{$}Date))&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;or&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;if( (&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;flag_A=1 and flag_B=0) or &lt;SPAN style="font-size: 13.3333330154419px;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;flag_A=0 and flag_B=1)&lt;/SPAN&gt; , &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;count(distinct{$}Date))&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;or&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Count(Distinct {$&amp;lt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;flag_A=,&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;flag_B=&lt;/SPAN&gt;&lt;/SPAN&gt; &amp;gt;} &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Date&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let me know if any of the expressions works for your situation.&lt;/P&gt;&lt;P&gt;We can proceed resolving your issue from there onwards.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;krishna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jul 2015 20:25:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Possible-in-Set-Analysis-to-count-distinct-dates-based-on-two/m-p/901791#M313655</guid>
      <dc:creator>Qrishna</dc:creator>
      <dc:date>2015-07-07T20:25:40Z</dc:date>
    </item>
    <item>
      <title>Re: Possible in Set Analysis to count distinct dates based on two separate fields?</title>
      <link>https://community.qlik.com/t5/QlikView/Possible-in-Set-Analysis-to-count-distinct-dates-based-on-two/m-p/901792#M313656</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if i understood it right you search the XOR(/) or OR(+)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;count({&amp;lt;flag_A={1}&amp;gt;/&amp;lt;flag_B={1}&amp;gt;} distinct Date)&lt;/P&gt;&lt;P&gt;count({&amp;lt;flag_A={1}&amp;gt;+&amp;lt;flag_B={1}&amp;gt;} distinct Date)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jul 2015 20:29:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Possible-in-Set-Analysis-to-count-distinct-dates-based-on-two/m-p/901792#M313656</guid>
      <dc:creator>jonasheisterkam</dc:creator>
      <dc:date>2015-07-07T20:29:04Z</dc:date>
    </item>
    <item>
      <title>Re: Possible in Set Analysis to count distinct dates based on two separate fields?</title>
      <link>https://community.qlik.com/t5/QlikView/Possible-in-Set-Analysis-to-count-distinct-dates-based-on-two/m-p/901793#M313657</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;All these years and I never caught that I could define separate sets with the &amp;lt; &amp;gt;.&lt;/P&gt;&lt;P&gt;Thank you for your quick posts!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's what I ended up with:&lt;/P&gt;&lt;P&gt;(sum(TaskExecution)+sum([Reload in Hub]))/count({&amp;lt;TaskExecution={1}&amp;gt;+&amp;lt;[Reload in Hub]={1}&amp;gt;} distinct Date)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;which as far as I can tell is equivalent to:&lt;/P&gt;&lt;P&gt;(sum(TaskExecution)+sum([Reload in Hub]))/count(distinct if(TaskExecution=1 or [Reload in Hub]=1,Date))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jul 2015 13:18:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Possible-in-Set-Analysis-to-count-distinct-dates-based-on-two/m-p/901793#M313657</guid>
      <dc:creator>Tyler_Waterfall</dc:creator>
      <dc:date>2015-07-08T13:18:30Z</dc:date>
    </item>
    <item>
      <title>Re: Possible in Set Analysis to count distinct dates based on two separate fields?</title>
      <link>https://community.qlik.com/t5/QlikView/Possible-in-Set-Analysis-to-count-distinct-dates-based-on-two/m-p/901794#M313658</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;which as far as I can tell is equivalent to:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;(sum(TaskExecution)+sum([Reload in Hub]))/count(distinct if(TaskExecution=1 or [Reload in Hub]=1,Date))&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;You are right Tyler &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jul 2015 13:21:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Possible-in-Set-Analysis-to-count-distinct-dates-based-on-two/m-p/901794#M313658</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-07-08T13:21:04Z</dc:date>
    </item>
  </channel>
</rss>

