<?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: Set Analysis Field1 less than Field2 in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Field1-less-than-Field2/m-p/405863#M151029</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A correct solution is depending on your data model, so I assume the most simple one, all fields Customer, Field1 and Field2 in one table and only one combination per Customer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=count( {$&amp;lt;Customer = {"=Field1&amp;lt;Field2"}&amp;gt;} DISTINCT Customer)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or similar without using set analysis (and with less restrictions to your data model):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=count(DISTINCT&amp;nbsp; if( Field1 &amp;lt; Field2, Customer))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 Feb 2013 18:49:53 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2013-02-05T18:49:53Z</dc:date>
    <item>
      <title>Set Analysis Field1 less than Field2</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Field1-less-than-Field2/m-p/405861#M151027</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to do a very simple expression where I need to count the distinct Customer when Field1 values are LESS THAN Field2 values. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Field1&amp;nbsp;&amp;nbsp; Field2&lt;/P&gt;&lt;P&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Count&lt;SPAN style="font-size: 12pt;"&gt;(&lt;SPAN style="color: #0000ff;"&gt;distinct&lt;/SPAN&gt; {$&amp;lt;Field1 = &lt;SPAN style="color: #0000ff;"&gt;P&lt;/SPAN&gt;({1&amp;lt;Field1={}&amp;gt;}Field2)&amp;gt;}Customer) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;Thank you.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Feb 2013 16:39:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Field1-less-than-Field2/m-p/405861#M151027</guid>
      <dc:creator />
      <dc:date>2013-02-05T16:39:33Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Field1 less than Field2</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Field1-less-than-Field2/m-p/405862#M151028</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #737373; font-family: Arial; font-size: 12.727272033691406px; background-color: #ffffff;"&gt;Count&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 12pt; color: #737373; font-family: Arial;"&gt;(&lt;SPAN style="color: #0000ff;"&gt;distinct&lt;/SPAN&gt; {$&amp;lt;Field1 = &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 12pt; color: #737373; font-family: Arial;"&gt;&lt;SPAN style="color: #0000ff;"&gt;{'&amp;lt;$(=&lt;/SPAN&gt;&lt;SPAN style="color: #737373;"&gt;Field2)'}&amp;gt;}Customer)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Feb 2013 18:46:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Field1-less-than-Field2/m-p/405862#M151028</guid>
      <dc:creator>chematos</dc:creator>
      <dc:date>2013-02-05T18:46:45Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Field1 less than Field2</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Field1-less-than-Field2/m-p/405863#M151029</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A correct solution is depending on your data model, so I assume the most simple one, all fields Customer, Field1 and Field2 in one table and only one combination per Customer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=count( {$&amp;lt;Customer = {"=Field1&amp;lt;Field2"}&amp;gt;} DISTINCT Customer)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or similar without using set analysis (and with less restrictions to your data model):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=count(DISTINCT&amp;nbsp; if( Field1 &amp;lt; Field2, Customer))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Feb 2013 18:49:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Field1-less-than-Field2/m-p/405863#M151029</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2013-02-05T18:49:53Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Field1 less than Field2</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Field1-less-than-Field2/m-p/405864#M151030</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Jose for your input!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Feb 2013 21:13:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Field1-less-than-Field2/m-p/405864#M151030</guid>
      <dc:creator />
      <dc:date>2013-02-05T21:13:20Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Field1 less than Field2</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Field1-less-than-Field2/m-p/405865#M151031</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;swuehl.&amp;nbsp; Thanks.&amp;nbsp; Your set analysis solution worked.&amp;nbsp; I couldn't use the example without the set analysis because what you solved for me was a part of a much larger set analsys expression. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;much appreciated!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Feb 2013 21:15:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Field1-less-than-Field2/m-p/405865#M151031</guid>
      <dc:creator />
      <dc:date>2013-02-05T21:15:05Z</dc:date>
    </item>
  </channel>
</rss>

