<?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 minus operation in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/set-analysis-and-minus-operation/m-p/963707#M330499</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you all for your replies.&lt;/P&gt;&lt;P&gt;I don't have any flag for inactive customers and neither an indication like sales value.&lt;/P&gt;&lt;P&gt;I have a source table with aggregated customers data per customer and month. I filter only customers with filed the status equals "Active". hence, I have records for each month. if a customer becomes inactive - it means I'll filter out his data from that month and so on.&lt;/P&gt;&lt;P&gt;by "minus" i meant that i want to implement the minus operation in SQL which allows me to get a record set which included in one data set and do NOT included in another.&lt;/P&gt;&lt;P&gt;is it possible with set analysis? or i need to do it via script only?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 21 Dec 2015 11:22:26 GMT</pubDate>
    <dc:creator>shayraber</dc:creator>
    <dc:date>2015-12-21T11:22:26Z</dc:date>
    <item>
      <title>set analysis and minus operation</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-and-minus-operation/m-p/963703#M330495</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi all,&lt;/P&gt;&lt;P&gt;I have a set of customer IDs in my document.&lt;/P&gt;&lt;P&gt;the ID is only for active customers per month.&lt;/P&gt;&lt;P&gt;the time resolution in my document is a month.&lt;/P&gt;&lt;P&gt;for example, in November I had 1000 customers, in December 10 new customers added and 25 became inactive so, the customers amount in December is 985.&lt;/P&gt;&lt;P&gt;what I wish to have is some object/expression which will show me per each month, which are the customers that became inactive (the 25 customers in December in my example).&lt;/P&gt;&lt;P&gt;is there a way of doing it via set analysis? or only at the script?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please assist,&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Dec 2015 10:06:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-and-minus-operation/m-p/963703#M330495</guid>
      <dc:creator>shayraber</dc:creator>
      <dc:date>2015-12-21T10:06:28Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis and minus operation</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-and-minus-operation/m-p/963704#M330496</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You will need some kind of logic to identify those customer. Maybe something like this: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;count({&amp;lt; Customer = {"=sum(sales)&amp;gt;0"}&amp;gt;} DISTINCT Customer)&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, 21 Dec 2015 11:03:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-and-minus-operation/m-p/963704#M330496</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2015-12-21T11:03:01Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis and minus operation</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-and-minus-operation/m-p/963705#M330497</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;is there any Flag to recognize inactive customers?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Dec 2015 11:09:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-and-minus-operation/m-p/963705#M330497</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2015-12-21T11:09:08Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis and minus operation</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-and-minus-operation/m-p/963706#M330498</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Since you asked about minus operation, guessing you have a flag to active customer. If so, you can try something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Count({&amp;lt;CustomerFlag -={'Active'}&amp;gt;} Distinct Customer)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Note the '-' symbol&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or, if you 'InActive' flag too, you can use simpler option like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Count({&amp;lt;CustomerFlag ={'InActive'}&amp;gt;} Distinct Customer) &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Dec 2015 11:11:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-and-minus-operation/m-p/963706#M330498</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2015-12-21T11:11:47Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis and minus operation</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-and-minus-operation/m-p/963707#M330499</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you all for your replies.&lt;/P&gt;&lt;P&gt;I don't have any flag for inactive customers and neither an indication like sales value.&lt;/P&gt;&lt;P&gt;I have a source table with aggregated customers data per customer and month. I filter only customers with filed the status equals "Active". hence, I have records for each month. if a customer becomes inactive - it means I'll filter out his data from that month and so on.&lt;/P&gt;&lt;P&gt;by "minus" i meant that i want to implement the minus operation in SQL which allows me to get a record set which included in one data set and do NOT included in another.&lt;/P&gt;&lt;P&gt;is it possible with set analysis? or i need to do it via script only?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Dec 2015 11:22:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-and-minus-operation/m-p/963707#M330499</guid>
      <dc:creator>shayraber</dc:creator>
      <dc:date>2015-12-21T11:22:26Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis and minus operation</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-and-minus-operation/m-p/963708#M330500</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;Would depend on your data. &lt;/P&gt;&lt;P&gt;What defines the types of customer . i.e. Active, Inactive. &lt;/P&gt;&lt;P&gt;Existing customer / new customer.&lt;/P&gt;&lt;P&gt;There will be a way to approach this in the set analysis and script, but would need a better understanding first.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Dec 2015 11:33:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-and-minus-operation/m-p/963708#M330500</guid>
      <dc:creator>Mark_Little</dc:creator>
      <dc:date>2015-12-21T11:33:00Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis and minus operation</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-and-minus-operation/m-p/963709#M330501</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Shay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you said:&lt;/P&gt;&lt;P&gt;"the ID is only for active customers per month."&lt;/P&gt;&lt;P&gt;This means if a user is inactive he will not have any ID, in this case create a expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;count(Distinct If(isnull(ID)&amp;lt;&amp;gt;-1,CustomerID))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In Dimension:&lt;/P&gt;&lt;P&gt;Month&lt;/P&gt;&lt;P&gt;You can create a Bar or straight chart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;KC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Dec 2015 11:36:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-and-minus-operation/m-p/963709#M330501</guid>
      <dc:creator>jyothish8807</dc:creator>
      <dc:date>2015-12-21T11:36:28Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis and minus operation</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-and-minus-operation/m-p/963710#M330502</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;that's correct BUT i want to get the customer's IDs.&lt;/P&gt;&lt;P&gt;getting how many customers became - that's i know.&lt;/P&gt;&lt;P&gt;the catch is to get their IDs... (concat for example, not count)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Dec 2015 13:06:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-and-minus-operation/m-p/963710#M330502</guid>
      <dc:creator>shayraber</dc:creator>
      <dc:date>2015-12-21T13:06:43Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis and minus operation</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-and-minus-operation/m-p/963711#M330503</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;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;I have a field for active customers.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;if a customer is active in month X and inactive in month X+1, than he will have a certain value in that field for month X and null for month X+1&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Dec 2015 13:11:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-and-minus-operation/m-p/963711#M330503</guid>
      <dc:creator>shayraber</dc:creator>
      <dc:date>2015-12-21T13:11:02Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis and minus operation</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-and-minus-operation/m-p/963712#M330504</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 this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; If(isnull(ID)&amp;lt;&amp;gt;-1,concat(Distinct CustomerID,';')))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;KC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Dec 2015 14:03:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-and-minus-operation/m-p/963712#M330504</guid>
      <dc:creator>jyothish8807</dc:creator>
      <dc:date>2015-12-21T14:03:24Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis and minus operation</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-and-minus-operation/m-p/963713#M330505</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Shay,&lt;/P&gt;&lt;P&gt;It's difficult to give you an expression that will work for you while knowing so little of your application but maybe something like this might work for you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your application replace &lt;SPAN style="font-size: 13.3333px;"&gt;EntryMPeriod with your month field and replace &lt;SPAN style="font-size: 13.3333px;"&gt;201511 and &lt;SPAN style="font-size: 13.3333px;"&gt;201510 with this month and the previous month respectively&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Concat(DISTINCT {$&lt;/P&gt;&lt;P&gt;&amp;lt;Customer = P({&amp;lt;EntryMPeriod = {201510}&amp;gt;})&amp;gt;-&amp;lt;Customer = P({&amp;lt;EntryMPeriod = {201511}&amp;gt;})&amp;gt;&lt;/P&gt;&lt;P&gt;}Customer,',')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my application this lists customers who placed orders in October but not in November, becoming, by your definition, inactive.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Dec 2015 14:22:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-and-minus-operation/m-p/963713#M330505</guid>
      <dc:creator>effinty2112</dc:creator>
      <dc:date>2015-12-21T14:22:20Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis and minus operation</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-and-minus-operation/m-p/963714#M330506</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;An important distinction:&lt;/P&gt;&lt;P&gt;If a customer is active in a particular month, then your field for that month will have a specific value, but if a customer is not active in another month will&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;the field contain a real NULL value for that month, or&lt;/LI&gt;&lt;LI&gt;will there be no field value (and no customer data) for that month at all?&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;QlikView cannot invent data on-the-fly when there is none. No data in a particular month means no customer ID for that month.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Dec 2015 15:18:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-and-minus-operation/m-p/963714#M330506</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2015-12-21T15:18:46Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis and minus operation</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-and-minus-operation/m-p/963715#M330507</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Peter,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it's not a real NULL but a no field value&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Dec 2015 07:27:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-and-minus-operation/m-p/963715#M330507</guid>
      <dc:creator>shayraber</dc:creator>
      <dc:date>2015-12-22T07:27:01Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis and minus operation</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-and-minus-operation/m-p/963716#M330508</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.qlik.com/qlik-users/89088"&gt;shayraber&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did my solution worked ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;KC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Dec 2015 08:32:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-and-minus-operation/m-p/963716#M330508</guid>
      <dc:creator>jyothish8807</dc:creator>
      <dc:date>2015-12-22T08:32:12Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis and minus operation</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-and-minus-operation/m-p/963717#M330509</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi KC,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nope. It didn't unfortunately...&lt;/P&gt;&lt;P&gt;See the solution below.&lt;/P&gt;&lt;P&gt;Marked as Correct Answer &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Dec 2015 11:12:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-and-minus-operation/m-p/963717#M330509</guid>
      <dc:creator>shayraber</dc:creator>
      <dc:date>2015-12-23T11:12:23Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis and minus operation</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-and-minus-operation/m-p/963718#M330510</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks!&lt;/P&gt;&lt;P&gt;that what I needed&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Dec 2015 11:12:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-and-minus-operation/m-p/963718#M330510</guid>
      <dc:creator>shayraber</dc:creator>
      <dc:date>2015-12-23T11:12:52Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis and minus operation</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-and-minus-operation/m-p/963719#M330511</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you all for your replies,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andrew made it and gave me the closest expression to what i looked for.&lt;/P&gt;&lt;P&gt;I used this:&lt;/P&gt;&lt;P&gt;=count(DISTINCT {$&amp;lt;SITE_ID = P({&amp;lt;PERIOD_CODE = {201510}&amp;gt;})&amp;gt;-&amp;lt;SITE_ID = P({&amp;lt;PERIOD_CODE = {201511}&amp;gt;})&amp;gt;&lt;/P&gt;&lt;P&gt;}if(isnull(key)&amp;lt;&amp;gt;-1,SITE_ID))&lt;/P&gt;&lt;P&gt;key is a field I'm using and only SITE_IDs (e.g. customer ID) which is active in a certain period will have a value in it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now,&lt;/P&gt;&lt;P&gt;I've tried but didn't succeeded to make is generic (within an expression). the solution is hard-coded and I'm trying to make it dynamic.&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 27 Dec 2015 08:44:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-and-minus-operation/m-p/963719#M330511</guid>
      <dc:creator>shayraber</dc:creator>
      <dc:date>2015-12-27T08:44:08Z</dc:date>
    </item>
  </channel>
</rss>

