<?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: Using boolean logic in set analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Using-boolean-logic-in-set-analysis/m-p/840737#M295480</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To chime in with Marcus &amp;amp; Stefan: You cannot use &lt;EM&gt;&lt;STRONG&gt;any&lt;/STRONG&gt;&lt;/EM&gt; Boolean expression. You have to use one that contains an aggregation, e.g:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {$&amp;lt;Customer = {"=Sum(Sales)&amp;gt;100"}&amp;gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {$&amp;lt;Customer = {"=Count(distinct OrderID)=100"}&amp;gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first one will find the customers that have sales &amp;gt; 100 and the second one those that have exactly 100 orders. Note that a customer can have many values of Sales and many orders, and so the search implies an aggregation. Conceptually it is like a For-Next loop: &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; For each Customer&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If Sum(Sales)&amp;gt;100 then include in outer calculation&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Next Customer&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 07 Jun 2015 17:09:05 GMT</pubDate>
    <dc:creator>hic</dc:creator>
    <dc:date>2015-06-07T17:09:05Z</dc:date>
    <item>
      <title>Using boolean logic in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Using-boolean-logic-in-set-analysis/m-p/840734#M295477</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm having a very hard time understanding how Boolean logic works in set analysis. I have scoured the Qlik Community and found explanations that seem clear but then aren't born out upon application; even advice from people with Guru status. There is an example given in a very useful source "Les set analysis_ENG.pdf' that goes like this:&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-family: Courier;"&gt;Syntax: {&amp;lt;Dimension = {&lt;/SPAN&gt;&lt;STRONG style="color: red; font-size: 10pt; font-family: Courier;"&gt;"=boolean condition"&lt;/STRONG&gt;&lt;SPAN style="color: black; font-family: Courier;"&gt;}&amp;gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;STRONG style="color: black; font-family: 'Arial','sans-serif';"&gt;Attention&lt;/STRONG&gt;&lt;SPAN style="color: black; font-family: 'Arial','sans-serif';"&gt;: the searched dimension cannot be also in the boolean condition. If needed, create an&lt;/SPAN&gt; &lt;SPAN style="color: black; font-family: 'Arial','sans-serif';"&gt;integer key with &lt;STRONG&gt;Autonumber&lt;/STRONG&gt;().&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-family: 'Arial','sans-serif';"&gt;We want to get the sales that have been delivered the same day. We have two fields : DayDelivery and &lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Arial','sans-serif';"&gt;DayOrder&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="color: blue; font-family: Courier; font-size: 10pt;"&gt;Sum({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: red; font-family: Courier; font-size: 10pt;"&gt;KeyAutoNumber = {"=(DayDelivery=DayOrder)" } &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: Courier; font-size: 10pt;"&gt;&amp;gt;} Sales)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;Since "Autonumber" generates integers the are assumed to be non-zero, this seems to imply that, from a Boolean point of view, "KeyAutoNumber", as generated by Autonumber, will always evaluate to True, since it will never be zero so that only True results of DayDelivery=DayOrder will be selected.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;If that's the case, then why wouldn't this work: I set field called "negone" in the script to be a constant -1, which is the defined Boolean value of true in Qlikview, Then I use this: sum({&amp;lt;negone= {"(attending_doc=operating_doc)"}&amp;gt;} revenue), and even though I know there are cases where I know attending_doc=operating_doc, it always produces zero revenue. Can someone explain this? Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jun 2015 23:06:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-boolean-logic-in-set-analysis/m-p/840734#M295477</guid>
      <dc:creator />
      <dc:date>2015-06-05T23:06:32Z</dc:date>
    </item>
    <item>
      <title>Re: Using boolean logic in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Using-boolean-logic-in-set-analysis/m-p/840735#M295478</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's not clear want do you want to do and where there are problems. The general logic from set analysis is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt; Dimension = {CertainValues}&amp;gt;} value)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;whereas CertainValues as a boolean condition to the Dimension worked which meant that only these values will be added where on dimension-level the condition returned a TRUE. Dimension shouldn't be an autonumber - it needed a "real" field. And of course the CertainValues could be an expression or a variable which is somehow calculated and which return a list of values. Important is that such calculation will be calculated globally for the chart and not on row-level.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That meant I think your expression should look more like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt; &lt;SPAN style="color: red; font-family: Courier; font-size: 10pt;"&gt;DayDelivery&lt;/SPAN&gt; = {"$(=max(&lt;SPAN style="color: red; font-family: Courier; font-size: 10pt;"&gt;DayOrder&lt;/SPAN&gt;))"}&amp;gt;} value)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Further for handling several date-areas within an application see: &lt;A href="https://community.qlik.com/qlik-blogpost/3585"&gt;Canonical Date&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 07 Jun 2015 09:44:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-boolean-logic-in-set-analysis/m-p/840735#M295478</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2015-06-07T09:44:46Z</dc:date>
    </item>
    <item>
      <title>Re: Using boolean logic in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Using-boolean-logic-in-set-analysis/m-p/840736#M295479</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Charlie,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't understand the 'Attention: ..' part of your posting or why this should be valid (what does &lt;SPAN style="font-size: 13.3333330154419px;"&gt;'cannot be in boolean condition' mean in that context?).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To my knowledge, there is no general limitation on the values of the dimension when using the set modifier mentioned above.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you use a set expression like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;{&amp;lt;Dimension {"=boolean condition"}&amp;gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it's actually telling QV to create an internal table with dimension Dimension and Expression&lt;/P&gt;&lt;P&gt;=boolean condition&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Every dimension value where the expression returns not zero (or TRUE, if you like) will be added to the list of values QV will use for a selection in field Dimension. Using the double quotes in the set modifier is also called 'using a search expression', you don't explicitely state the Dimension field values you want to select, but use an expression for filtering.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A common search expression / boolean condition would be something like&lt;/P&gt;&lt;P&gt;=sum(Sales) &amp;gt;1000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you see, since QV creates an internal table, you can use aggregations over dimension Dimension in your search expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Coming back to your issue, what do you get when you create a straight table chart with dimension negone and expression:&lt;/P&gt;&lt;P&gt;=attending_doc=operating_doc&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You probably know that using fields without aggregation in an expression will only return values when there is only one value possible (like adding an only() function around the field names).&lt;/P&gt;&lt;P&gt;Thus, when you have more than a single value for attending_doc and operating_doc related to each dimension value of negone, you won't get a result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe there are other (set) expressions that fulfill your requirement, but you need to describe your setting (data, model, requirement) a little more in detail if you want more detailed help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 07 Jun 2015 15:41:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-boolean-logic-in-set-analysis/m-p/840736#M295479</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-06-07T15:41:12Z</dc:date>
    </item>
    <item>
      <title>Re: Using boolean logic in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Using-boolean-logic-in-set-analysis/m-p/840737#M295480</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To chime in with Marcus &amp;amp; Stefan: You cannot use &lt;EM&gt;&lt;STRONG&gt;any&lt;/STRONG&gt;&lt;/EM&gt; Boolean expression. You have to use one that contains an aggregation, e.g:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {$&amp;lt;Customer = {"=Sum(Sales)&amp;gt;100"}&amp;gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {$&amp;lt;Customer = {"=Count(distinct OrderID)=100"}&amp;gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first one will find the customers that have sales &amp;gt; 100 and the second one those that have exactly 100 orders. Note that a customer can have many values of Sales and many orders, and so the search implies an aggregation. Conceptually it is like a For-Next loop: &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; For each Customer&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If Sum(Sales)&amp;gt;100 then include in outer calculation&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Next Customer&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 07 Jun 2015 17:09:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-boolean-logic-in-set-analysis/m-p/840737#M295480</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2015-06-07T17:09:05Z</dc:date>
    </item>
    <item>
      <title>Re: Using boolean logic in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Using-boolean-logic-in-set-analysis/m-p/840738#M295481</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I found an interesting way of incorporating the boolean expression within the main aggregation, but outside of the set analysis. Here's what I was trying to do without success:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt;set expressions,boolean expression&amp;gt;} field)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; boolean expression:&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt; {"=(fld1=fld2)"}&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's what works perfectly:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt;set expressions&amp;gt;} if(boolean expression,field))&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; boolean expresson: fld1=fld2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've never seen this before and didn't realize it was possible, but it works well; instant response time with a 10+ million record doc.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jun 2015 07:39:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-boolean-logic-in-set-analysis/m-p/840738#M295481</guid>
      <dc:creator />
      <dc:date>2015-06-10T07:39:54Z</dc:date>
    </item>
    <item>
      <title>Re: Using boolean logic in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Using-boolean-logic-in-set-analysis/m-p/840739#M295482</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If the comparison needs to be done on a record base, you need to do it the second way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But how does your first version looks like in example? Is still can't really get what you mean with 'boolean expression' in this context.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;{"=(fld1=fld2)"} is syntax for an element list of a field selection, so you need to state a field name in combination:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;field = {"=(fld1=fld2)"}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and with more complete set analysis syntax_&lt;/P&gt;&lt;P&gt;{&amp;lt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;field = {"=(fld1=fld2)"} &lt;/SPAN&gt;&amp;gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As discussed before the boolean within the search will potentially not return an unambiguous answer when iterated over all record combinations related to field, thus defaulting to false. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jun 2015 07:58:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-boolean-logic-in-set-analysis/m-p/840739#M295482</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-06-10T07:58:17Z</dc:date>
    </item>
    <item>
      <title>Re: Using boolean logic in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Using-boolean-logic-in-set-analysis/m-p/840740#M295483</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I got something from Community.Try this, it might help you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jun 2015 08:03:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-boolean-logic-in-set-analysis/m-p/840740#M295483</guid>
      <dc:creator>hariprasadqv</dc:creator>
      <dc:date>2015-06-10T08:03:01Z</dc:date>
    </item>
    <item>
      <title>Re: Using boolean logic in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Using-boolean-logic-in-set-analysis/m-p/840741#M295484</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, you can of course do this. Just be aware of the following potential problems:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The If()-function is evaluated on every record in your 10+ million record data set. This could imply a performance problem.&lt;/LI&gt;&lt;LI&gt;A normal aggregation, e.g. Sum( { set expression } Amount ), will sum over the records of the table where the field Amount is found. But your aggregation will sum over the records of a table which potentially could be larger: The product of Amount x fld1 x fld2; like a join between the three. If fld1 and fld2 are in the same table as Amount, you have no problem. &lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But if the response times are acceptable, and there are no duplication of records due to the 2nd bullet, there is no reason why you shouldn't use this solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Read more on&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/3807"&gt;Conditional Aggregations&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/3808"&gt;Performance of Conditional Aggregations&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jun 2015 08:08:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-boolean-logic-in-set-analysis/m-p/840741#M295484</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2015-06-10T08:08:24Z</dc:date>
    </item>
    <item>
      <title>Re: Using boolean logic in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Using-boolean-logic-in-set-analysis/m-p/840742#M295485</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What I found to be interesting is that I’ve never seen an instance of this syntax before, the “sum({} field)). The interesting part is that this: the latter one that I have seen many places produces erroneous results (very small error, but an error nonetheless) while the first one that I essentially just concocted myself produces accurate results. I don’t know enough about the “behind the syntax” processing to understand why that is; could you explain that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Charlie&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jun 2015 17:54:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-boolean-logic-in-set-analysis/m-p/840742#M295485</guid>
      <dc:creator />
      <dc:date>2015-06-10T17:54:41Z</dc:date>
    </item>
    <item>
      <title>Re: Using boolean logic in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Using-boolean-logic-in-set-analysis/m-p/840743#M295486</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to define a Dimension of CustomerName where the sum of sales&amp;lt;&amp;gt;0.&amp;nbsp; Following the pattern of your example, I tried this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;{$&amp;lt;CustomerName = {"=Sum({$&amp;lt;InvoiceYear={$(vCurrentYear)}&amp;gt;}ItemSalesAmt)&amp;lt;&amp;gt;0"}&amp;gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and when this produced an invalid dimension, I tried a simplified version, which I believe follows your template exactly:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;{$&amp;lt;CustomerName = {"=Sum(ItemSalesAmt)&amp;lt;&amp;gt;0"}&amp;gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Neither of these works.&amp;nbsp; I have been using a CustomerName dimension which works, as well as a Measure like the embedded Sum(), without problem.&amp;nbsp; Am I not permitted to define a dimension like this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Jul 2015 16:31:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-boolean-logic-in-set-analysis/m-p/840743#M295486</guid>
      <dc:creator>plexpro52</dc:creator>
      <dc:date>2015-07-01T16:31:58Z</dc:date>
    </item>
    <item>
      <title>Re: Using boolean logic in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Using-boolean-logic-in-set-analysis/m-p/840744#M295487</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Charlie,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;gt;&amp;gt; Here's what works perfectly:&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum({&amp;lt;set expressions&amp;gt;} if(boolean expression,field))&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; boolean expresson: fld1=fld2&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I've never seen this before and didn't realize it was possible&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I discovered this last week also, with some assistance from Michael Solomovich, and found that it appears to work.&amp;nbsp; Like yourself, I have seen no example like this in the Help, nor yet about how to use the results of functions which return Boolean values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to see the explained, and more examples of actual usage in the Help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Jul 2015 16:49:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-boolean-logic-in-set-analysis/m-p/840744#M295487</guid>
      <dc:creator>plexpro52</dc:creator>
      <dc:date>2015-07-01T16:49:22Z</dc:date>
    </item>
    <item>
      <title>Re: Using boolean logic in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Using-boolean-logic-in-set-analysis/m-p/840745#M295488</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I had no luck with the Boolean expression like you have either. That’s why I went with the format that you saw in the email you sent right after this one.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Jul 2015 17:23:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-boolean-logic-in-set-analysis/m-p/840745#M295488</guid>
      <dc:creator />
      <dc:date>2015-07-01T17:23:41Z</dc:date>
    </item>
    <item>
      <title>Re: Using boolean logic in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Using-boolean-logic-in-set-analysis/m-p/840746#M295489</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;René Valencourt wrote:&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;I'm trying to define a Dimension of CustomerName where the sum of sales&amp;lt;&amp;gt;0.&amp;nbsp; Following the pattern of your example, I tried this:&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;{$&amp;lt;CustomerName = {"=Sum({$&amp;lt;InvoiceYear={$(vCurrentYear)}&amp;gt;}ItemSalesAmt)&amp;lt;&amp;gt;0"}&amp;gt;}&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;and when this produced an invalid dimension, I tried a simplified version, which I believe follows your template exactly:&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;{$&amp;lt;CustomerName = {"=Sum(ItemSalesAmt)&amp;lt;&amp;gt;0"}&amp;gt;}&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Neither of these works.&amp;nbsp; I have been using a CustomerName dimension which works, as well as a Measure like the embedded Sum(), without problem.&amp;nbsp; Am I not permitted to define a dimension like this?&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;If you just put the term in curly brackets into the calculated dimension editor, this will not work.&lt;/P&gt;&lt;P&gt;The term only makes sense within an aggregation function, like sum(), count(), only().&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's typically used within an aggregation in an expression on expression tab, not (but with exeptions) within a calculated dimension.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try using CustomerName as your dimension. Then you need to use a set expression like above within the aggregations you are using on expression tab. Let's assume you have a single expression&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=Sum(ItemSalesAmt)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then your expression with the set expression looks like&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=Sum(&lt;/EM&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 13.3333330154419px;"&gt;&lt;EM&gt;{$&amp;lt;CustomerName = {"=Sum({$&amp;lt;InvoiceYear={$(vCurrentYear)}&amp;gt;}ItemSalesAmt)&amp;lt;&amp;gt;0"}&amp;gt;} ItemSalesAmt)&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This should now only show the Customers with an ItemSalesAmt different from zero for current IncoiceYear, but aggregating over all possible years.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create an additional InvoiceYear list box. Select the current year. You should see the customers and their ItemSalesAmt as used for the set expression filter.&lt;/P&gt;&lt;P&gt;Now select a different year. You should see a subset of the same customers, but with their ItemSalesAmt for the selected year.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Jul 2015 17:47:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-boolean-logic-in-set-analysis/m-p/840746#M295489</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-07-01T17:47:28Z</dc:date>
    </item>
    <item>
      <title>Re: Using boolean logic in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Using-boolean-logic-in-set-analysis/m-p/840747#M295490</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think the lesson here (evident by the fact that it works in this qvw but not when I or a lot of other people try to do it) is that the fields to compare in the Boolean logic expression and the field to be aggregated all have to be in the same table. That doesn't work for the particular problem I'm trying to solve.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For those who are wondering why anyone would want to do this, you could take a look at this qvw, for one. It appears to be made in conjunction with the pdf referenced in the original post. For another example, here's what I'm trying to do:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have some tables linked up by people. Sometimes those people are trained in one place and working in another place. I have a straight table displayed in my application with the dimension as the place where they're working on projects. I have various columns showing numbers regarding the projects they're working on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would also like to display how many people were trained at those locations in another column of the same chart. There are way more people trained people than there are working on projects, and there are many differences in fields between the two tables, so I don't want my data all in one table. There are also a lot more complications with the data model that I'm not going to get into here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Normally, I would just link up the tables by place and then I could easily just display information from both tables side-by-side. But I need to have the finer-resolution link by person for other reasons such as making selections or displaying straight tables by person. I obviously can't link the tables by both person and place.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I'm going to have to do is make a small table that joins the two other tables and aggregates the number of trained people by place, but linking it only to the place in the projects table. But it really seems like there should be a way to do this with set analysis, as evident in all of the posts about this kind of thing. Effectively, "If the other table has the same value in the trained place field as this first column has in the project place field, then count people from both tables."&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Apr 2018 14:37:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-boolean-logic-in-set-analysis/m-p/840747#M295490</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-04-19T14:37:47Z</dc:date>
    </item>
    <item>
      <title>Re: Using boolean logic in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Using-boolean-logic-in-set-analysis/m-p/840748#M295491</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think this isn't mainly a question of set analysis and any boolean logics within or without it else a question how to design the datamodel to address your requirements. In your case it could be that you need to concatenate both tables or to create a link-table (I don't mean a table with aggregated data) to get a datamodel which suits your needs. Set analysis is a very powerful feature but it couldn't cure failures within the datamodel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Beside this you need to ensure that your data(-quality) is sufficient to the views which should be provided - again any significantly lack within the raw-data couldn't be compensated with any measures afterwards.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here a few links which could be helpful for you:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/3119"&gt;Concatenate vs Link Table&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/4531"&gt;The As-Of Table&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Apr 2018 06:34:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-boolean-logic-in-set-analysis/m-p/840748#M295491</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2018-04-20T06:34:05Z</dc:date>
    </item>
    <item>
      <title>Re: Using boolean logic in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Using-boolean-logic-in-set-analysis/m-p/840749#M295492</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marcus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It would be hard to overstate how many other functions these two tables (by project location and trained location) are already successfully accomplishing for the client, so I certainly wouldn't say there are failures in the data model. It's just that this new requirement requested by the client is not possible given the current data model and the fact that this idea of Boolean logic in set analysis doesn't work the way that people tend to think it will work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've got my solution by adding one small table to my data model. (So your phrase "lack within" the data model is more accurate, although not at all a significant lack. Again, I can't link up the tables by place because they're linked up with better, finer resolution [people] and I can't concatenate because my project data table would be full of null values, which is why I'm not using the Boolean logic in set analysis within one table as I mentioned before.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The new table is linked up to the project data by location, but counts the number of people who were trained at that location. It only keeps places that are in the project dataset, since that's the only way it will be displayed in the application table. Like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Trained_Count_by_Project_Location:&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Left&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Keep&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; (Project_Data) &lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;LOAD&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Trained_Location&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Project_Location&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Count&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Person&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Trained_Count&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Resident&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; Trained_Data&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Group&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;By&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Trained_Location&lt;BR /&gt;; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I still think it would've been intuitive to do this in set analysis by programming the straight table to count the people trained at a location and display it in a column next to the location they work at as the dimension, i.e. something like Count({&amp;lt;-1 = "Trained_Location = Project Location"&amp;gt;} Person), which quite a few people have seemed to have a need for.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for the links. I'll have to keep the As-Of Table in mind for future applications, especially more easily calculating rolling 12-month averages, which have seemed a little overcomplicated in the past.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sincerely,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Brit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Apr 2018 13:50:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-boolean-logic-in-set-analysis/m-p/840749#M295492</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-04-23T13:50:15Z</dc:date>
    </item>
    <item>
      <title>Re: Using boolean logic in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Using-boolean-logic-in-set-analysis/m-p/840750#M295493</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I look on your dummy-expression I would say the logic could only work if the data-associations are set properly because the set analysis worked like a where-condition within the load of a table and couldn't create a new matching of the tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I could imagine that you could get this with an aggr-function maybe something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum(aggr(-(Trained_Location = [Project Location]), Person))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;whereby aggr-functions could consume a lot of performance and your keep-table might therefore be more suitable at all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Apr 2018 15:23:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-boolean-logic-in-set-analysis/m-p/840750#M295493</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2018-04-23T15:23:09Z</dc:date>
    </item>
  </channel>
</rss>

