<?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: And vs Or in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/And-vs-Or/m-p/37408#M2555</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Petter, could you describe a situation in which you would want to use an AND operation on the same Field?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 01 May 2018 01:03:52 GMT</pubDate>
    <dc:creator>m_perreault</dc:creator>
    <dc:date>2018-05-01T01:03:52Z</dc:date>
    <item>
      <title>And vs Or</title>
      <link>https://community.qlik.com/t5/App-Development/And-vs-Or/m-p/37406#M2553</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am reviewing someone's script and I cannot tell if an 'And vs Or' situation is creating errors in the data. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The script uses a where clause &lt;/P&gt;&lt;P&gt;'&lt;/P&gt;&lt;P&gt;and (&lt;/P&gt;&lt;P&gt;(Type&amp;lt;&amp;gt;'Fund' &lt;SPAN style="color: #ff0000;"&gt;and&lt;/SPAN&gt; Type&amp;lt;&amp;gt;'Other')&lt;/P&gt;&lt;P&gt;or IsChildPortfolio='False'&lt;/P&gt;&lt;P&gt;) '&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Should the script instead by &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and (&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Type&amp;lt;&amp;gt;'Fund' &lt;SPAN style="color: #ff0000;"&gt;or&lt;/SPAN&gt; Type&amp;lt;&amp;gt;'Other')&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;or IsChildPortfolio='False'&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;) '&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a difference between the two?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Apr 2018 23:25:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/And-vs-Or/m-p/37406#M2553</guid>
      <dc:creator>m_perreault</dc:creator>
      <dc:date>2018-04-30T23:25:53Z</dc:date>
    </item>
    <item>
      <title>Re: And vs Or</title>
      <link>https://community.qlik.com/t5/App-Development/And-vs-Or/m-p/37407#M2554</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Clearly they are different and the two script snippets will give different results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just try to calculate manually when Type is equal to 'Fund' and see what you get for both script snippets - different results. For the first parenthesis the first snippet will return false and the second snippet will return true.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So it might be that the logic should be changed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 May 2018 00:12:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/And-vs-Or/m-p/37407#M2554</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2018-05-01T00:12:46Z</dc:date>
    </item>
    <item>
      <title>Re: And vs Or</title>
      <link>https://community.qlik.com/t5/App-Development/And-vs-Or/m-p/37408#M2555</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Petter, could you describe a situation in which you would want to use an AND operation on the same Field?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 May 2018 01:03:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/And-vs-Or/m-p/37408#M2555</guid>
      <dc:creator>m_perreault</dc:creator>
      <dc:date>2018-05-01T01:03:52Z</dc:date>
    </item>
    <item>
      <title>Re: And vs Or</title>
      <link>https://community.qlik.com/t5/App-Development/And-vs-Or/m-p/37409#M2556</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It seems to me that this has to be taken into a larger context and can't be done in isolation.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 May 2018 01:21:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/And-vs-Or/m-p/37409#M2556</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2018-05-01T01:21:35Z</dc:date>
    </item>
    <item>
      <title>Re: And vs Or</title>
      <link>https://community.qlik.com/t5/App-Development/And-vs-Or/m-p/37410#M2557</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sure, could you explain how Qlik handles the following.&amp;nbsp; It seems counter intuitive to me &lt;IMG alt="Screen Shot 2018-04-30 at 9.26.52 PM.png" class="jive-image image-1" src="/legacyfs/online/201152_Screen Shot 2018-04-30 at 9.26.52 PM.png" style="height: 147px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 May 2018 01:32:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/And-vs-Or/m-p/37410#M2557</guid>
      <dc:creator>m_perreault</dc:creator>
      <dc:date>2018-05-01T01:32:59Z</dc:date>
    </item>
    <item>
      <title>Re: And vs Or</title>
      <link>https://community.qlik.com/t5/App-Development/And-vs-Or/m-p/37411#M2558</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is a huge risk with using "bare" fields in any measure in Qlik Sense. You should always (or almost always) use aggregation functions with all field in measures. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If your data returns more than one value for each "row" in a chart/table then a bare field reference will not know what to do with it. So it will turn into a NULL and the full expression might not calculate at all or return the wrong answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your example screenshot above I can't see if multiple values will be returned for each of the fields in your measures.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Henric Cronström has written several blogs/documents about how you should always use an aggregation function and I advice you to read them thoroughly to understand why:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/3779"&gt;Use Aggregation Functions!&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/3235"&gt;It’s all Aggregations&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/2662"&gt;The Only Function&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Even though they are all written in the context of QlikView they are 100% relevant for Qlik Sense....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 May 2018 09:18:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/And-vs-Or/m-p/37411#M2558</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2018-05-04T09:18:13Z</dc:date>
    </item>
  </channel>
</rss>

