<?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: compare two fields with set analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/compare-two-fields-with-set-analysis/m-p/1191357#M384975</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;Johan Kruize wrote:&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;I have used this variation too, but I have to add more "analysis" conditions and then I am stuck&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;EDIT: placed the if statement now after the analysis after the "analysis" ....seems to work&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;That's what I would do:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use Set Analysis for the filter that filters your dimensional values (not on a per record base) and the if() statement to filter on a per record base.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or create a flag in your load script to compare goal and actual value on the required granularity and use the flag in your set analysis.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 25 Oct 2016 10:34:39 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2016-10-25T10:34:39Z</dc:date>
    <item>
      <title>compare two fields with set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/compare-two-fields-with-set-analysis/m-p/1191351#M384969</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a table with employees and their sales per date.&lt;/P&gt;&lt;P&gt;every row has a field with their total sales and their goal.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to count the employees who reached their goal&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so my expression =&lt;/P&gt;&lt;P&gt;count(distinct {&amp;lt;total_sales ={"&amp;gt;= goal" }&amp;gt;}employee)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried much &lt;SPAN lang="en"&gt;variations, with and without dollar-signs but no correct results.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;What am I doing wrong ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;I tried to use a variable too, that compares both fields and result in a Yes or No (total_sales &amp;gt; goal)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;but that did'nt work either&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Oct 2016 09:08:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/compare-two-fields-with-set-analysis/m-p/1191351#M384969</guid>
      <dc:creator>curiousfellow</dc:creator>
      <dc:date>2016-10-25T09:08:14Z</dc:date>
    </item>
    <item>
      <title>Re: compare two fields with set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/compare-two-fields-with-set-analysis/m-p/1191352#M384970</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you want to make the comparison on a per record base, try&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Count(DISTINCT If( total_sales &amp;gt;= goal, employee))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Oct 2016 09:12:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/compare-two-fields-with-set-analysis/m-p/1191352#M384970</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-10-25T09:12:45Z</dc:date>
    </item>
    <item>
      <title>Re: compare two fields with set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/compare-two-fields-with-set-analysis/m-p/1191353#M384971</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;count(distinct {&amp;lt;total_sales = {"&amp;gt;= $(=sum(goal))" }&amp;gt;}employee)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Oct 2016 09:15:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/compare-two-fields-with-set-analysis/m-p/1191353#M384971</guid>
      <dc:creator>shraddha_g</dc:creator>
      <dc:date>2016-10-25T09:15:05Z</dc:date>
    </item>
    <item>
      <title>Re: compare two fields with set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/compare-two-fields-with-set-analysis/m-p/1191354#M384972</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have used this variation too, but I have to add more "analysis" conditions and then I am stuck&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EDIT: placed the if statement now after the analysis after the "analysis" ....seems to work&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Oct 2016 09:33:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/compare-two-fields-with-set-analysis/m-p/1191354#M384972</guid>
      <dc:creator>curiousfellow</dc:creator>
      <dc:date>2016-10-25T09:33:38Z</dc:date>
    </item>
    <item>
      <title>Re: compare two fields with set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/compare-two-fields-with-set-analysis/m-p/1191355#M384973</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This does'n't give the correct result. It looks like if the comparison is made once and than the result is displayed for all employee&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so when my expression is:&amp;nbsp; &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;count(distinct {&amp;lt;total_sales = {"&amp;gt;= $(=sum(goal))" }&amp;gt;}employee) then its allways 0 and when I&amp;nbsp; use &lt;SPAN style="font-size: 13.3333px;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;count(distinct {&amp;lt;total_sales = {"&amp;lt;= $(=sum(goal))" }&amp;gt;}employee) then its allways 1&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Oct 2016 09:48:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/compare-two-fields-with-set-analysis/m-p/1191355#M384973</guid>
      <dc:creator>curiousfellow</dc:creator>
      <dc:date>2016-10-25T09:48:25Z</dc:date>
    </item>
    <item>
      <title>Re: compare two fields with set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/compare-two-fields-with-set-analysis/m-p/1191356#M384974</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How about this may be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Count(DISTINCT {&amp;lt;empolyee = {"=Sum(total_sales) &amp;gt;= goal"}&amp;gt;}employee)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Oct 2016 09:59:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/compare-two-fields-with-set-analysis/m-p/1191356#M384974</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-10-25T09:59:42Z</dc:date>
    </item>
    <item>
      <title>Re: compare two fields with set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/compare-two-fields-with-set-analysis/m-p/1191357#M384975</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;Johan Kruize wrote:&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;I have used this variation too, but I have to add more "analysis" conditions and then I am stuck&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;EDIT: placed the if statement now after the analysis after the "analysis" ....seems to work&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;That's what I would do:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use Set Analysis for the filter that filters your dimensional values (not on a per record base) and the if() statement to filter on a per record base.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or create a flag in your load script to compare goal and actual value on the required granularity and use the flag in your set analysis.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Oct 2016 10:34:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/compare-two-fields-with-set-analysis/m-p/1191357#M384975</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-10-25T10:34:39Z</dc:date>
    </item>
  </channel>
</rss>

