<?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 and filter values in two columns based on their difference i in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Compare-and-filter-values-in-two-columns-based-on-their/m-p/1202106#M874697</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What's your actual expression? Might be as simple as a syntax error.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 31 Oct 2016 20:25:38 GMT</pubDate>
    <dc:creator>johnw</dc:creator>
    <dc:date>2016-10-31T20:25:38Z</dc:date>
    <item>
      <title>Compare and filter values in two columns based on their difference i</title>
      <link>https://community.qlik.com/t5/QlikView/Compare-and-filter-values-in-two-columns-based-on-their/m-p/1202102#M874693</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have been struggling to add a filter or flag for comparing Sum1 and Sum2? I would like to be able to choose which product Ids have Sum2-Sum1 = 0 and which ones not equal to 0. The ideal soultion would be a flag as filter having both 0 and 'not zero', so if I click 0 I will have only rows with Ids 1 and 4 displayed. Any idea? Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); border-image: none; width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Id&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Sum1&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Sum2&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;P&gt;1&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;500&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;500&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;750&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;400&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;3&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;200&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;90&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;4&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;800&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;800&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Compare-and-filter-values-in-two-columns-based-on-their/m-p/1202102#M874693</guid>
      <dc:creator>amigo007</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Compare and filter values in two columns based on their difference i</title>
      <link>https://community.qlik.com/t5/QlikView/Compare-and-filter-values-in-two-columns-based-on-their/m-p/1202103#M874694</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If Sum1 and Sum2 are actual fields in your table, not just in a chart, then in script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;if(Sum2=Sum1,0,'Not 0') as [Difference Flag],&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Oct 2016 18:55:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Compare-and-filter-values-in-two-columns-based-on-their/m-p/1202103#M874694</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2016-10-31T18:55:43Z</dc:date>
    </item>
    <item>
      <title>Re: Compare and filter values in two columns based on their difference i</title>
      <link>https://community.qlik.com/t5/QlikView/Compare-and-filter-values-in-two-columns-based-on-their/m-p/1202104#M874695</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;But let's say they aren't fields in your data model, but calculations in a chart. Say your data has an ID, and fields One and Two, and you're showing a chart of ID, sum(One), and sum(Two). You can make a list box with this expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;aggr(if(sum(Two)-sum(One)=0,0,'Not 0'),ID)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See attached.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Oct 2016 19:03:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Compare-and-filter-values-in-two-columns-based-on-their/m-p/1202104#M874695</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2016-10-31T19:03:33Z</dc:date>
    </item>
    <item>
      <title>Re: Compare and filter values in two columns based on their difference i</title>
      <link>https://community.qlik.com/t5/QlikView/Compare-and-filter-values-in-two-columns-based-on-their/m-p/1202105#M874696</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot for your time and your help, much appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This solution seems to be exactly what I need, however, I got an empty List Box. I have this kind of expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;aggr&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: #0000ff; font-size: 8pt;"&gt;Sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(2)-SUM(1)/1000=0,0,'Not 0'),ID&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I got no error message in the expression box. I had to divide SUM(1) by 100 to get the same units as SUM2.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Oct 2016 20:11:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Compare-and-filter-values-in-two-columns-based-on-their/m-p/1202105#M874696</guid>
      <dc:creator>amigo007</dc:creator>
      <dc:date>2016-10-31T20:11:01Z</dc:date>
    </item>
    <item>
      <title>Re: Compare and filter values in two columns based on their difference i</title>
      <link>https://community.qlik.com/t5/QlikView/Compare-and-filter-values-in-two-columns-based-on-their/m-p/1202106#M874697</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What's your actual expression? Might be as simple as a syntax error.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Oct 2016 20:25:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Compare-and-filter-values-in-two-columns-based-on-their/m-p/1202106#M874697</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2016-10-31T20:25:38Z</dc:date>
    </item>
    <item>
      <title>Re: Compare and filter values in two columns based on their difference i</title>
      <link>https://community.qlik.com/t5/QlikView/Compare-and-filter-values-in-two-columns-based-on-their/m-p/1202107#M874698</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You were right Mr. John, I had to replace 'ID' with the new dimension name that I'm using. Now it works!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a million. Cheers!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Oct 2016 20:46:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Compare-and-filter-values-in-two-columns-based-on-their/m-p/1202107#M874698</guid>
      <dc:creator>amigo007</dc:creator>
      <dc:date>2016-10-31T20:46:02Z</dc:date>
    </item>
  </channel>
</rss>

