<?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 'AND' &amp; 'OR' in same expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-analysis-AND-OR-in-same-expression/m-p/868138#M1015047</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;All you need is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SUM({$&amp;lt;dim_YearValue = {$(=YEAR(TODAY()))},&lt;/P&gt;&lt;P&gt;CustomerBusinessArea={'ba1', 'ba2', 'ba3', 'ba4', 'ba5', 'ba6', 'ba7'}&amp;gt;} AMOUNT)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will AND the two conditions (&lt;SPAN style="font-size: 13.3333330154419px;"&gt;dim_YearValue&amp;nbsp; and &lt;SPAN style="font-size: 13.3333330154419px;"&gt;CustomerBusinessArea&lt;/SPAN&gt;&lt;/SPAN&gt;) . The &lt;SPAN style="font-size: 13.3333330154419px;"&gt;CustomerBusinessArea condition will return true for any of the values in the list (OR)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 20 Apr 2015 13:03:29 GMT</pubDate>
    <dc:creator>jonathandienst</dc:creator>
    <dc:date>2015-04-20T13:03:29Z</dc:date>
    <item>
      <title>Set analysis 'AND' &amp; 'OR' in same expression</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-AND-OR-in-same-expression/m-p/868137#M1015046</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;Hoping someone can help. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effectively I want to use a combination of logic in a single set analysis fomula. I understand that a comma is used in set analysis to get a result where both conditions are true (AND), and that a + is used for when either condition is true. Effectively, I want the amount to be summed when one condition (that yearvalue is current year) is always true, but when a condition is in a range of other values. Sample below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=(SUM({$&amp;lt;dim_YearValue={$(=YEAR(TODAY()))}&amp;gt;,&lt;/P&gt;&lt;P&gt;&amp;lt;CustomerBusinessArea={'ba1'}&amp;gt;&lt;/P&gt;&lt;P&gt;+ &amp;lt;customerBusinessArea={'ba2'}&amp;gt;&lt;/P&gt;&lt;P&gt;+ &amp;lt;customerBusinessArea={'ba3'}&amp;gt;&lt;/P&gt;&lt;P&gt;+ &amp;lt;customerBusinessArea={'ba4'}&amp;gt;&lt;/P&gt;&lt;P&gt;+ &amp;lt;customerBusinessArea={'ba5'}&amp;gt;&lt;/P&gt;&lt;P&gt;+ &amp;lt;customerBusinessArea={'ba6'}&amp;gt;&lt;/P&gt;&lt;P&gt;+ &amp;lt;customerBusinessArea={'ba7'}&amp;gt;} AMOUNT))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Apr 2015 12:59:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-AND-OR-in-same-expression/m-p/868137#M1015046</guid>
      <dc:creator />
      <dc:date>2015-04-20T12:59:39Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis 'AND' &amp; 'OR' in same expression</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-AND-OR-in-same-expression/m-p/868138#M1015047</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;All you need is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SUM({$&amp;lt;dim_YearValue = {$(=YEAR(TODAY()))},&lt;/P&gt;&lt;P&gt;CustomerBusinessArea={'ba1', 'ba2', 'ba3', 'ba4', 'ba5', 'ba6', 'ba7'}&amp;gt;} AMOUNT)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will AND the two conditions (&lt;SPAN style="font-size: 13.3333330154419px;"&gt;dim_YearValue&amp;nbsp; and &lt;SPAN style="font-size: 13.3333330154419px;"&gt;CustomerBusinessArea&lt;/SPAN&gt;&lt;/SPAN&gt;) . The &lt;SPAN style="font-size: 13.3333330154419px;"&gt;CustomerBusinessArea condition will return true for any of the values in the list (OR)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Apr 2015 13:03:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-AND-OR-in-same-expression/m-p/868138#M1015047</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2015-04-20T13:03:29Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis 'AND' &amp; 'OR' in same expression</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-AND-OR-in-same-expression/m-p/868139#M1015048</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I guess you need this:&lt;/P&gt;&lt;P&gt;sum(&lt;/P&gt;&lt;P&gt;{$&amp;lt;dim_YearValue={"$(=YEAR(TODAY()))"}, CustomerBusinessArea={'ba1','ba2','ba3','ba4','ba5','ba6','ba7'}&amp;gt;}&lt;/P&gt;&lt;P&gt;AMOUNT)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Apr 2015 13:06:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-AND-OR-in-same-expression/m-p/868139#M1015048</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-04-20T13:06:16Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis 'AND' &amp; 'OR' in same expression</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-AND-OR-in-same-expression/m-p/868140#M1015049</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dave, maybe intersection is what you're searching:&lt;/P&gt;&lt;P&gt;=(SUM({$&amp;lt;dim_YearValue={$(=YEAR(TODAY()))}&amp;gt;,&lt;/P&gt;&lt;P&gt;&amp;lt;CustomerBusinessArea*={'ba1','ba2','ba3'.....}&amp;gt;} AMOUNT))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After the *= QV will detect an error but on top of expression it says 'Expression OK', so it should work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Apr 2015 13:06:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-AND-OR-in-same-expression/m-p/868140#M1015049</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2015-04-20T13:06:20Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis 'AND' &amp; 'OR' in same expression</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-AND-OR-in-same-expression/m-p/868141#M1015050</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;Try below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=(SUM({$&amp;lt;dim_YearValue={"$(=YEAR(TODAY()))"},&lt;/P&gt;&lt;P&gt;CustomerBusinessArea={'ba1','ba2','ba3','ba4','ba5','ba6','ba7'}&amp;gt;} AMOUNT))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Apr 2015 13:06:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-AND-OR-in-same-expression/m-p/868141#M1015050</guid>
      <dc:creator>PrashantSangle</dc:creator>
      <dc:date>2015-04-20T13:06:53Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis 'AND' &amp; 'OR' in same expression</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-AND-OR-in-same-expression/m-p/868142#M1015051</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks to everyone, Jonathan got there first.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Apr 2015 13:11:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-AND-OR-in-same-expression/m-p/868142#M1015051</guid>
      <dc:creator />
      <dc:date>2015-04-20T13:11:18Z</dc:date>
    </item>
  </channel>
</rss>

