<?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 Set analysis difference in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-analysis-difference/m-p/1106206#M901467</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 the following requirement for a measure:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;OL style="list-style-type: decimal;"&gt;&lt;LI&gt;Calculate the number of shoppers in a particular period who did not shop in the previous 12 months.&lt;/LI&gt;&lt;LI&gt;The current period is indicated by a date type of “TP” and the previous 12 months indicated by date types of “LP”,”LA”,”IX” and “TB”.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The set analysis expression in the sample app attached would appear to be structured correctly [using an exclusion operator (-)]. However, the result is not as expected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is confusing here is that the union operator + works.&amp;nbsp; The sole difference between the union and the exclusion being the + changed to a (-).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If anyone could shed some light on this or point me in the right direction, that would be much appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From the research I've done and input from colleagues it would appear that the P() and E() functions aren't suitable as they don't take into account dimensionality in a chart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to create an expression using set analysis to provide the expected result without changing the data model?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
    <dc:creator>gp_oconnor</dc:creator>
    <dc:date>2020-11-25T16:16:04Z</dc:date>
    <item>
      <title>Set analysis difference</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-difference/m-p/1106206#M901467</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 the following requirement for a measure:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;OL style="list-style-type: decimal;"&gt;&lt;LI&gt;Calculate the number of shoppers in a particular period who did not shop in the previous 12 months.&lt;/LI&gt;&lt;LI&gt;The current period is indicated by a date type of “TP” and the previous 12 months indicated by date types of “LP”,”LA”,”IX” and “TB”.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The set analysis expression in the sample app attached would appear to be structured correctly [using an exclusion operator (-)]. However, the result is not as expected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is confusing here is that the union operator + works.&amp;nbsp; The sole difference between the union and the exclusion being the + changed to a (-).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If anyone could shed some light on this or point me in the right direction, that would be much appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From the research I've done and input from colleagues it would appear that the P() and E() functions aren't suitable as they don't take into account dimensionality in a chart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to create an expression using set analysis to provide the expected result without changing the data model?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&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/Set-analysis-difference/m-p/1106206#M901467</guid>
      <dc:creator>gp_oconnor</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis difference</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-difference/m-p/1106207#M901468</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Revisited this after close to 2 years.&amp;nbsp; Found an alternative solution without changing the data model, using aggregation function.&amp;nbsp; Expression below, amended app attached.&amp;nbsp; It will probably have a high overhead for larger sets of data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum(Aggr(if(Sum({&amp;lt;[PROM_DATE_TYPE]={'TP'},[LINK_LEVEL]={'50'},[COUNT_CASH_PCI]={'0'}&amp;gt;} [COUNT_PCI]) &amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum({&amp;lt;[PROM_DATE_TYPE]={'LP','LA','IX','TB'},[LINK_LEVEL]={'50'},[COUNT_CASH_PCI]={'0'}&amp;gt;} [COUNT_PCI] ),1,0),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [PROM_ID],[COUNT_PCI]))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jun 2018 10:45:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-difference/m-p/1106207#M901468</guid>
      <dc:creator>gp_oconnor</dc:creator>
      <dc:date>2018-06-08T10:45:14Z</dc:date>
    </item>
  </channel>
</rss>

