<?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: Comparing two field in set analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Comparing-two-field-in-set-analysis/m-p/974526#M974722</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is a case for the P() function in set analysis;&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;sum({$&amp;lt;OpenDate=P(MISDate)&amp;gt;} Amount)&lt;/SPAN&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;BR /&gt;&lt;/SPAN&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;Match filter field OpenDate on the possible dates acquired from the MISDate field.&lt;/SPAN&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;But this will match all OpenDate to all MISDate.&lt;/SPAN&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;If you want only those where OpenDate = MISDate on the exact data post you need a different approach.&lt;/SPAN&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;I would probably add a field when loading data where I store if the dates are equal and use that field in set analysis.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 04 Sep 2015 09:27:34 GMT</pubDate>
    <dc:creator>Anders_Eriksson</dc:creator>
    <dc:date>2015-09-04T09:27:34Z</dc:date>
    <item>
      <title>Comparing two field in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Comparing-two-field-in-set-analysis/m-p/974520#M974714</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can we compare two field in set analysis?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have seen some earlier posted question but no proper response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example: I am having two fields say OpenData, MISDate with Amount.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can I write some thing in SET like =sum({&amp;lt;OpenDate=MISDate&amp;gt;} Amount)??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried with IF, it is working but not with set analysis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls suggest.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Balraj Ahlawat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Sep 2015 08:36:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Comparing-two-field-in-set-analysis/m-p/974520#M974714</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-09-04T08:36:18Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing two field in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Comparing-two-field-in-set-analysis/m-p/974521#M974715</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No you cannot, you can use Field = Value where this value can be a specific field single value but not the entire set of values.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Sep 2015 08:38:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Comparing-two-field-in-set-analysis/m-p/974521#M974715</guid>
      <dc:creator>alexandros17</dc:creator>
      <dc:date>2015-09-04T08:38:53Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing two field in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Comparing-two-field-in-set-analysis/m-p/974522#M974716</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;may be try:&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;sum({&amp;lt;Date={"=&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;OpenDate=MISDate&lt;/SPAN&gt;"}&amp;gt;}Amount)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Sep 2015 08:43:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Comparing-two-field-in-set-analysis/m-p/974522#M974716</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-09-04T08:43:19Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing two field in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Comparing-two-field-in-set-analysis/m-p/974523#M974717</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try this&lt;/P&gt;&lt;P&gt;sum({&amp;lt;OpenDate={'=MISDate'}&amp;gt;} Amount)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Sep 2015 08:49:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Comparing-two-field-in-set-analysis/m-p/974523#M974717</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-09-04T08:49:03Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing two field in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Comparing-two-field-in-set-analysis/m-p/974524#M974718</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you please post a sample?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Sep 2015 09:14:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Comparing-two-field-in-set-analysis/m-p/974524#M974718</guid>
      <dc:creator>sasiparupudi1</dc:creator>
      <dc:date>2015-09-04T09:14:59Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing two field in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Comparing-two-field-in-set-analysis/m-p/974525#M974720</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try like:&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;EM&gt;sum({&amp;lt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;OpenDate&lt;/SPAN&gt;={"=&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;OpenDate=MISDate&lt;/SPAN&gt;"}&amp;gt;}Amount)&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Sep 2015 09:19:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Comparing-two-field-in-set-analysis/m-p/974525#M974720</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2015-09-04T09:19:06Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing two field in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Comparing-two-field-in-set-analysis/m-p/974526#M974722</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is a case for the P() function in set analysis;&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;sum({$&amp;lt;OpenDate=P(MISDate)&amp;gt;} Amount)&lt;/SPAN&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;BR /&gt;&lt;/SPAN&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;Match filter field OpenDate on the possible dates acquired from the MISDate field.&lt;/SPAN&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;But this will match all OpenDate to all MISDate.&lt;/SPAN&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;If you want only those where OpenDate = MISDate on the exact data post you need a different approach.&lt;/SPAN&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;I would probably add a field when loading data where I store if the dates are equal and use that field in set analysis.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Sep 2015 09:27:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Comparing-two-field-in-set-analysis/m-p/974526#M974722</guid>
      <dc:creator>Anders_Eriksson</dc:creator>
      <dc:date>2015-09-04T09:27:34Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing two field in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Comparing-two-field-in-set-analysis/m-p/974527#M974724</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;sum({&amp;lt;OpenDate={"=&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;OpenDate=&lt;/SPAN&gt;MISDate"}&amp;gt;} Amount)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum(if(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;OpenDate=&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;MISDate,&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Amount))&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;OpenDate=p(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;MISDate&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;Amount&lt;/SPAN&gt;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Sep 2015 09:31:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Comparing-two-field-in-set-analysis/m-p/974527#M974724</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2015-09-04T09:31:20Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing two field in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Comparing-two-field-in-set-analysis/m-p/974528#M974726</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Another way of doing that would solve your problem is:&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;sum( -(OpenDate=MISDate) * Amount)&lt;/SPAN&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;BR /&gt;&lt;/SPAN&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;The comparison yields 0 if uneqal and -1 if equal dates.&lt;/SPAN&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;Negating that you get 1 for equal dates, 0 for unequal dates &lt;/SPAN&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;which you then can use as a simple factor in a multiplication.&lt;/SPAN&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;This does away with the if() function which is notorious for taking &lt;/SPAN&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;resources when computing and should be avoided if possible.&lt;BR /&gt;&lt;/SPAN&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;Doing that I would probably add a comment to the code explaining what it does.&lt;/SPAN&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;For someone experienced in C-programming it is nothing strange.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Sep 2015 11:36:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Comparing-two-field-in-set-analysis/m-p/974528#M974726</guid>
      <dc:creator>Anders_Eriksson</dc:creator>
      <dc:date>2015-09-04T11:36:59Z</dc:date>
    </item>
  </channel>
</rss>

