<?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 lost customers in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/set-analysis-lost-customers/m-p/313555#M498717</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; If You use Year={"*"} you select all of the years.... Instead you want to disregard the selections in the field. &lt;/P&gt;&lt;P&gt;And you wanted last months but not this months...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I would do something like this:&lt;/P&gt;&lt;P&gt;count(&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt; $&amp;lt;CLIENT_NAME={"=sum({$&amp;lt;Month=, Year=, [Year Week]=,&amp;nbsp; [Week]=, PeriodCounter={"$(#=max(PeriodCounter)-1)"}&amp;gt;} [Bill Amount])&amp;gt;0"}&amp;gt; &lt;/P&gt;&lt;P&gt;* &lt;/P&gt;&lt;P&gt; $&amp;lt;CLIENT_NAME={"=sum({$&amp;lt;Month=, Year=, [Year Week]=,&amp;nbsp; [Week]=, PeriodCounter={"$(#=max(PeriodCounter))"}&amp;gt;} [Bill Amount])=0"}&amp;gt; &lt;/P&gt;&lt;P&gt;} &lt;/P&gt;&lt;P&gt;distinct CLIENT_NAME)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To SETS... One for the billing last months where Bill Amount &amp;gt; 0 combined with one for current month where Bill Amount =0. They are combined with a Intersection, i.e. Both of the sets must be fullfilled...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Hans&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 23 Jun 2011 07:56:15 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-06-23T07:56:15Z</dc:date>
    <item>
      <title>set-analysis lost customers</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-lost-customers/m-p/313554#M498716</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;Im trying to create a set analysis expression to meassure the number of customer that was billed last month but not this month. my expression looks like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;count({$&amp;lt;CLIENT_NAME={"=sum({$&amp;lt;Month={"*"}, Year={"*"}, [Year Week]={"*"},&amp;nbsp; [Week]={"*"}, PeriodCounter={"$(#=max(PeriodCounter))"}&amp;gt;} [Bill Amount])&amp;gt;0"}&amp;gt;}distinct CLIENT_NAME)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but it dosent work, does anyone have an idea how i could solve this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jun 2011 06:03:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-lost-customers/m-p/313554#M498716</guid>
      <dc:creator />
      <dc:date>2011-06-23T06:03:39Z</dc:date>
    </item>
    <item>
      <title>set-analysis lost customers</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-lost-customers/m-p/313555#M498717</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; If You use Year={"*"} you select all of the years.... Instead you want to disregard the selections in the field. &lt;/P&gt;&lt;P&gt;And you wanted last months but not this months...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I would do something like this:&lt;/P&gt;&lt;P&gt;count(&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt; $&amp;lt;CLIENT_NAME={"=sum({$&amp;lt;Month=, Year=, [Year Week]=,&amp;nbsp; [Week]=, PeriodCounter={"$(#=max(PeriodCounter)-1)"}&amp;gt;} [Bill Amount])&amp;gt;0"}&amp;gt; &lt;/P&gt;&lt;P&gt;* &lt;/P&gt;&lt;P&gt; $&amp;lt;CLIENT_NAME={"=sum({$&amp;lt;Month=, Year=, [Year Week]=,&amp;nbsp; [Week]=, PeriodCounter={"$(#=max(PeriodCounter))"}&amp;gt;} [Bill Amount])=0"}&amp;gt; &lt;/P&gt;&lt;P&gt;} &lt;/P&gt;&lt;P&gt;distinct CLIENT_NAME)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To SETS... One for the billing last months where Bill Amount &amp;gt; 0 combined with one for current month where Bill Amount =0. They are combined with a Intersection, i.e. Both of the sets must be fullfilled...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Hans&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jun 2011 07:56:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-lost-customers/m-p/313555#M498717</guid>
      <dc:creator />
      <dc:date>2011-06-23T07:56:15Z</dc:date>
    </item>
    <item>
      <title>set-analysis lost customers</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-lost-customers/m-p/313556#M498718</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 tried that but the expression gives null:&lt;/P&gt;&lt;P&gt;=count({$&amp;lt;[Client ID]={"=sum({&amp;lt;PeriodCounter={"$(#=max(PeriodCounter)-1)&amp;gt;}[Bill Amount])&amp;gt;0"}*{"=sum({&amp;lt;PeriodCounter={"$(#=max(PeriodCounter))&amp;gt;}[Bill Amount])=0"}&amp;gt;} distinct [Client ID])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the expression&lt;/P&gt;&lt;P&gt;sum({&amp;lt;PeriodCounter={"$(#=max(PeriodCounter)-1)&amp;gt;}[Bill Amount])&lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;P&gt;sum({&amp;lt;PeriodCounter={"$(#=max(PeriodCounter))&amp;gt;}[Bill Amount])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;gives the correct values but when i combine then the result is null, do i need to do an aggr or something like that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jun 2011 09:29:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-lost-customers/m-p/313556#M498718</guid>
      <dc:creator />
      <dc:date>2011-06-23T09:29:26Z</dc:date>
    </item>
    <item>
      <title>set-analysis lost customers</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-lost-customers/m-p/313557#M498719</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 would go for the Set-Analysis... &lt;/P&gt;&lt;P&gt;Where do you use the expression? Graph? Textbox? If Graph, what dimensions...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yours expression, do they work? I miss a second " in the expressions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you have an example of your qvw?&lt;/P&gt;&lt;P&gt;Everything you write in ={"..."} should work in the searchbox af al list field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So if you use =sum({&amp;lt;PeriodCounter={$(#=max(PeriodCounter)-1)&amp;gt;}[Bill Amount])&amp;gt;0 and sum({&amp;lt;PeriodCounter={$(#=max(PeriodCounter))&amp;gt;}[Bill Amount]) = 0 as a search filter in the ClientId listbox.&lt;/P&gt;&lt;P&gt;It should work to use the same expression in a Set analysis statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;count({1&amp;lt;[Client ID]={"sum({1&amp;lt;PeriodCounter={$(#=max(PeriodCounter)-1)&amp;gt;}[Bill Amount])&amp;gt;0 and sum({1&amp;lt;PeriodCounter={$(#=max(PeriodCounter))&amp;gt;}[Bill Amount]) = 0"}&amp;gt;} distinct [Client ID])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Hans&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jun 2011 10:10:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-lost-customers/m-p/313557#M498719</guid>
      <dc:creator />
      <dc:date>2011-06-23T10:10:09Z</dc:date>
    </item>
    <item>
      <title>Re: set-analysis lost customers</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-lost-customers/m-p/313558#M498720</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;/P&gt;&lt;P&gt;Thanks for you help hansiola. But i tried both expression in textboxes, one give 0 and the other null. I attached a file and hope someone can help me..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;/Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jun 2011 14:32:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-lost-customers/m-p/313558#M498720</guid>
      <dc:creator />
      <dc:date>2011-06-23T14:32:07Z</dc:date>
    </item>
    <item>
      <title>Re: set-analysis lost customers</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-lost-customers/m-p/313559#M498721</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I barely glanced at the thread, so apologies if this example is totally useless, but it's an example of calculating new, lost and retained customers from year to year.&amp;nbsp; It doesn't use set analysis for the counts.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jun 2011 00:11:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-lost-customers/m-p/313559#M498721</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-06-24T00:11:25Z</dc:date>
    </item>
    <item>
      <title>Re: set-analysis lost customers</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-lost-customers/m-p/313560#M498722</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt; Hej,&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;Nice app from John, but I dident find it to calculate correctly in the retaind field??? &lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;You might wan't the reason, why your set expression diden't calculate... &lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;I attached an app with the set analysis like:&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;/DIV&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;=count&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;PeriodCounter&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;CLIENT_NAME&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'=sum({1&amp;lt;PeriodCounter={"$(=max(PeriodCounter)-1)"}&amp;gt;} [Bill Amount])&amp;gt;0 and (sum({1&amp;lt;PeriodCounter={"$(=max(PeriodCounter))"}&amp;gt;} [Bill Amount])=0 )'}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;distinct&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;CLIENT_NAME&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 10pt;"&gt;As you can seee, if you use a nested expression, not both of them can use ". And also since you using an expression as a selection, you are better of using 1 as a Set Identifier. &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 10pt;"&gt;BR &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 10pt;"&gt;Hans&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Jun 2011 02:27:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-lost-customers/m-p/313560#M498722</guid>
      <dc:creator />
      <dc:date>2011-06-26T02:27:33Z</dc:date>
    </item>
    <item>
      <title>Re: set-analysis lost customers</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-lost-customers/m-p/313561#M498723</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Hans, that worked brilliantly!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jun 2011 07:12:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-lost-customers/m-p/313561#M498723</guid>
      <dc:creator />
      <dc:date>2011-06-27T07:12:45Z</dc:date>
    </item>
    <item>
      <title>Re: set-analysis lost customers</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-lost-customers/m-p/313562#M498724</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Daniel: You are welcome!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;John: nice app. I wrote that I find an error in the calculation. &lt;/P&gt;&lt;P&gt;That was all in my app and my doing. I don't find any error... &lt;/P&gt;&lt;P&gt;Just wanted to clearify my previus post...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR &lt;/P&gt;&lt;P&gt;Hans&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jun 2011 07:45:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-lost-customers/m-p/313562#M498724</guid>
      <dc:creator />
      <dc:date>2011-06-27T07:45:33Z</dc:date>
    </item>
  </channel>
</rss>

