<?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: help with set analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Expression-to-count-Unique-field-values-from-two-tables/m-p/1229988#M391992</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Count(DISTINCT If(STATUS_A = 'SUCCESS' or STATUS_B = 'SUCCESS', EMPNO))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 25 Nov 2016 13:33:47 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2016-11-25T13:33:47Z</dc:date>
    <item>
      <title>Expression to count Unique field values from two tables</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-to-count-Unique-field-values-from-two-tables/m-p/1229985#M391989</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have two tables which consists of employee id and status.&lt;/P&gt;&lt;P&gt;Basically i want to create an expression which counts unique no of employees in both the tables which have status as success.&lt;/P&gt;&lt;P&gt;In my output i should get EMPLOYEES WITH ID'S&amp;nbsp; 1,2,3,4,5,6,7,8,9&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 128px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD height="20" width="64"&gt;EMPNO&lt;/TD&gt;&lt;TD width="64"&gt;STATUS_A&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="20"&gt;1&lt;/TD&gt;&lt;TD&gt;SUCCESS&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="20"&gt;2&lt;/TD&gt;&lt;TD&gt;SUCCESS&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="20"&gt;3&lt;/TD&gt;&lt;TD&gt;SUCCESS&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="20"&gt;4&lt;/TD&gt;&lt;TD&gt;SUCCESS&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="20"&gt;5&lt;/TD&gt;&lt;TD&gt;SUCCESS&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="20"&gt;6&lt;/TD&gt;&lt;TD&gt;SUCCESS&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;EMPNO&lt;/TD&gt;&lt;TD&gt;STATUS_B&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="20"&gt;1&lt;/TD&gt;&lt;TD&gt;SUCCESS&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="20"&gt;2&lt;/TD&gt;&lt;TD&gt;SUCCESS&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="20"&gt;7&lt;/TD&gt;&lt;TD&gt;SUCCESS&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="20"&gt;8&lt;/TD&gt;&lt;TD&gt;SUCCESS&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="20"&gt;9&lt;/TD&gt;&lt;TD&gt;SUCCESS&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="20"&gt;10&lt;/TD&gt;&lt;TD&gt;UNSUCCESS&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nadeem&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Nov 2016 12:52:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-to-count-Unique-field-values-from-two-tables/m-p/1229985#M391989</guid>
      <dc:creator>fashid</dc:creator>
      <dc:date>2016-11-25T12:52:18Z</dc:date>
    </item>
    <item>
      <title>Re: help with set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-to-count-Unique-field-values-from-two-tables/m-p/1229986#M391990</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Where are you hoping to get this result? Chart or Text box object?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Nov 2016 12:57:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-to-count-Unique-field-values-from-two-tables/m-p/1229986#M391990</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-11-25T12:57:32Z</dc:date>
    </item>
    <item>
      <title>Re: help with set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-to-count-Unique-field-values-from-two-tables/m-p/1229987#M391991</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I may use it a gauge chart or text object &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Nov 2016 13:04:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-to-count-Unique-field-values-from-two-tables/m-p/1229987#M391991</guid>
      <dc:creator>fashid</dc:creator>
      <dc:date>2016-11-25T13:04:34Z</dc:date>
    </item>
    <item>
      <title>Re: help with set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-to-count-Unique-field-values-from-two-tables/m-p/1229988#M391992</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Count(DISTINCT If(STATUS_A = 'SUCCESS' or STATUS_B = 'SUCCESS', EMPNO))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Nov 2016 13:33:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-to-count-Unique-field-values-from-two-tables/m-p/1229988#M391992</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-11-25T13:33:47Z</dc:date>
    </item>
    <item>
      <title>Re: help with set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-to-count-Unique-field-values-from-two-tables/m-p/1229989#M391993</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;t1:&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;load&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;*&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;inline&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[EMPNO ,STATUS_A &lt;BR /&gt; 1 ,SUCCESS &lt;BR /&gt; 2 ,SUCCESS &lt;BR /&gt; 3 ,SUCCESS &lt;BR /&gt; 4 ,SUCCESS &lt;BR /&gt; 5 ,SUCCESS &lt;BR /&gt; 6 ,SUCCESS &lt;BR /&gt; ]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;;&lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Concatenate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; t2:&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;LOAD&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;*&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Inline&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[&lt;BR /&gt; EMPNO ,STATUS_B &lt;BR /&gt; 1, SUCCESS &lt;BR /&gt; 2 ,SUCCESS &lt;BR /&gt; 7, SUCCESS &lt;BR /&gt; 8 ,SUCCESS &lt;BR /&gt; 9 ,SUCCESS &lt;BR /&gt; 10, UNSUCCESS &lt;BR /&gt; ]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;WHERE&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;NOT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Exists&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;EMPNO&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;); &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;EXPRESSIN IN TEXT BOX&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Count&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;STATUS_A&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;='SUCCESS' &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;OR&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;STATUS_B&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;='SUCCESS',&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;EMPNO&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)) &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Nov 2016 14:09:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-to-count-Unique-field-values-from-two-tables/m-p/1229989#M391993</guid>
      <dc:creator>krishna20</dc:creator>
      <dc:date>2016-11-25T14:09:25Z</dc:date>
    </item>
    <item>
      <title>Re: help with set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-to-count-Unique-field-values-from-two-tables/m-p/1229990#M391994</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you so much stefan that does it for me .&lt;/P&gt;&lt;P&gt;I have one more question would this be possible with set analysis&lt;/P&gt;&lt;P&gt;Count({&amp;lt;STATUS_A={'SUCCESS'}&amp;gt; + &lt;SPAN style="font-size: 13.3333px;"&gt;&amp;lt;STATUS_B={'SUCCESS'}&amp;gt;&lt;/SPAN&gt;}Distinct EMPNO)&lt;/P&gt;&lt;P&gt;I was thinking on these lines but could not make it work .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Nov 2016 16:43:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-to-count-Unique-field-values-from-two-tables/m-p/1229990#M391994</guid>
      <dc:creator>fashid</dc:creator>
      <dc:date>2016-11-25T16:43:19Z</dc:date>
    </item>
    <item>
      <title>Re: Expression to count Unique field values from two tables</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-to-count-Unique-field-values-from-two-tables/m-p/1229991#M391995</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I assume you have just these two tables linked by EMPNO?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could try a natural set like&lt;/P&gt;&lt;P&gt;=Count({&amp;lt;EMPNO = p({&amp;lt;STATUS_A={'SUCCESS'}&amp;gt;})+p({&amp;lt;STATUS_B={'SUCCESS'}&amp;gt;}) &amp;gt;}Distinct EMPNO)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to proceed with your approach, it might work if you make EMPNO a perfect key in at least one table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A:&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;EMPNO, STATUS_A&lt;/P&gt;&lt;P&gt;1, SUCCESS&lt;/P&gt;&lt;P&gt;2, SUCCESS&lt;/P&gt;&lt;P&gt;3, SUCCESS&lt;/P&gt;&lt;P&gt;4, SUCCESS&lt;/P&gt;&lt;P&gt;5, SUCCESS&lt;/P&gt;&lt;P&gt;6, SUCCESS&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;B:&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;EMPNO, STATUS_B&lt;/P&gt;&lt;P&gt;1, SUCCESS&lt;/P&gt;&lt;P&gt;2, SUCCESS&lt;/P&gt;&lt;P&gt;7, SUCCESS&lt;/P&gt;&lt;P&gt;8, SUCCESS&lt;/P&gt;&lt;P&gt;9, SUCCESS&lt;/P&gt;&lt;P&gt;10, UNSUCCESS&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PERFECT:&lt;/P&gt;&lt;P&gt;LOAD Recno() as EMPNO&lt;/P&gt;&lt;P&gt;AutoGenerate 10;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Nov 2016 17:50:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-to-count-Unique-field-values-from-two-tables/m-p/1229991#M391995</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-11-25T17:50:52Z</dc:date>
    </item>
    <item>
      <title>Re: Expression to count Unique field values from two tables</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-to-count-Unique-field-values-from-two-tables/m-p/1229992#M391996</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot Guru for showing the different approaches &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Nov 2016 17:58:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-to-count-Unique-field-values-from-two-tables/m-p/1229992#M391996</guid>
      <dc:creator>fashid</dc:creator>
      <dc:date>2016-11-25T17:58:50Z</dc:date>
    </item>
  </channel>
</rss>

