<?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 syntax problem in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-analysis-syntax-problem/m-p/219465#M72494</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Bill, in your case that can be solved with set analysis your expression should look similar to this:&lt;/P&gt;&lt;P&gt;count({gender = {'men'}, age = {'young'}} PersonID)&lt;/P&gt;&lt;P&gt;You can modify the above to get your 4 expressions.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 Apr 2010 18:55:03 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-04-20T18:55:03Z</dc:date>
    <item>
      <title>Set analysis syntax problem</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-syntax-problem/m-p/219462#M72491</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've got a syntax problem with set analysis in an expression:&lt;/P&gt;&lt;P&gt;In a chart I have the following fields:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Customer&lt;/LI&gt;&lt;LI&gt;Startdate (Startdate is the date the customer buys his products exclusively at my company.. before this date he was already a customer)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I want to compare the sales of the year before and after the customer started to buy exclusively at my store (when he buys exclusively he gets discount).&lt;/P&gt;&lt;P&gt;For the expression I can use the field&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;MinOneYearStartdate&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;This field contains the year before the startdate.... (for example: if Startdate = 1-1-2008 MinOneYearStartdate is 2007)&lt;/P&gt;&lt;P&gt;In the chart I use the following expression:&lt;/P&gt;&lt;P&gt;=Sum( {&amp;lt;Year={$(#=Only(MinOneYearStartdate))} &amp;gt;} Sales)&lt;/P&gt;&lt;P&gt;Somehow this does only work when I select one customer... When I have more customers selected it doesn't anymore... When I use:&lt;/P&gt;&lt;P&gt;=Sum( {&amp;lt;Year={$(#=Only(Year-1))} &amp;gt;} Sales)&lt;/P&gt;&lt;P&gt;The set analysis expression is working with multiple customers selected but I want the MinOneYearStartdate as value there of course.... can someone help me out? Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Apr 2010 16:57:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-syntax-problem/m-p/219462#M72491</guid>
      <dc:creator />
      <dc:date>2010-04-20T16:57:43Z</dc:date>
    </item>
    <item>
      <title>Set analysis syntax problem</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-syntax-problem/m-p/219463#M72492</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, the problem is that your field MinOneYearStartdate is calculated I'm guessing for every customer, so when you apply the function only it will return null when more than one customer is selected, that's the reason of the behaviour you just explained. I think you can solve this problem by using a sum(if) instead of the set analysis.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Apr 2010 17:32:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-syntax-problem/m-p/219463#M72492</guid>
      <dc:creator />
      <dc:date>2010-04-20T17:32:27Z</dc:date>
    </item>
    <item>
      <title>Set analysis syntax problem</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-syntax-problem/m-p/219464#M72493</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;have similar problem&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Assume variable "gender" with values "men" and "women"&lt;/P&gt;&lt;P&gt;Assume variable "age" associated with each record. Values can be "young" or "old"&lt;/P&gt;&lt;P&gt;In one bar chart with 4 bars, I want to compare count on "young men" with count on "all men" and count on "young women" with count on "all women"&lt;/P&gt;&lt;P&gt;I think the string ($&amp;lt;age&amp;gt;=) goes in there somewhere, but I can make this work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Apr 2010 18:48:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-syntax-problem/m-p/219464#M72493</guid>
      <dc:creator />
      <dc:date>2010-04-20T18:48:04Z</dc:date>
    </item>
    <item>
      <title>Set analysis syntax problem</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-syntax-problem/m-p/219465#M72494</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Bill, in your case that can be solved with set analysis your expression should look similar to this:&lt;/P&gt;&lt;P&gt;count({gender = {'men'}, age = {'young'}} PersonID)&lt;/P&gt;&lt;P&gt;You can modify the above to get your 4 expressions.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Apr 2010 18:55:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-syntax-problem/m-p/219465#M72494</guid>
      <dc:creator />
      <dc:date>2010-04-20T18:55:03Z</dc:date>
    </item>
    <item>
      <title>Set analysis syntax problem</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-syntax-problem/m-p/219466#M72495</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks.. going to try with an if statement!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Apr 2010 10:35:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-syntax-problem/m-p/219466#M72495</guid>
      <dc:creator />
      <dc:date>2010-04-21T10:35:19Z</dc:date>
    </item>
  </channel>
</rss>

