<?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 - Match 2 conditions in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Match-2-conditions/m-p/239051#M501613</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot AT.&lt;/P&gt;&lt;P&gt;Unfortunately the Order Date is not related to Season....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 04 Mar 2011 13:52:02 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-03-04T13:52:02Z</dc:date>
    <item>
      <title>Set Analysis - Match 2 conditions</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Match-2-conditions/m-p/239046#M501608</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;I have a problem! [:(]&lt;/P&gt;&lt;P&gt;I want to count the customers that have sales in two different season.&lt;/P&gt;&lt;P&gt;My issue is to count the customers that have sales in current season and also in the previous season but with order date &amp;lt;= (today()-365), that is to say customers that have sales in the last year until today()-365).&lt;/P&gt;&lt;P&gt;To explain better: today is 3rd March 2011. What I need is to count distinct customers that have sales in current season and also in previous season but with order date &amp;lt;= 3rd March 2010.&lt;/P&gt;&lt;P&gt;I try this with set analysis (i have two variables, s1 and s2, to indicate respectively current season and previous season).&lt;/P&gt;&lt;P&gt;I try this formula but it does not work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;count({$&amp;lt;[Season]={$(s1)}&amp;gt;*&amp;lt;[Season]={$(s2)}, [Order Date]={"&amp;lt;$(=date(setdateyear(today(),year(today())-1),'YYYYMMDD'))"}&amp;gt;}distinct [Customer])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could someone help me?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Mar 2011 09:21:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Match-2-conditions/m-p/239046#M501608</guid>
      <dc:creator />
      <dc:date>2011-03-04T09:21:55Z</dc:date>
    </item>
    <item>
      <title>Set Analysis - Match 2 conditions</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Match-2-conditions/m-p/239047#M501609</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Don't overcomplicate your life!&lt;/P&gt;&lt;P&gt;Count({set1} Customer) + Count({set2} Customer)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stephen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Mar 2011 10:13:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Match-2-conditions/m-p/239047#M501609</guid>
      <dc:creator>stephencredmond</dc:creator>
      <dc:date>2011-03-04T10:13:50Z</dc:date>
    </item>
    <item>
      <title>Set Analysis - Match 2 conditions</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Match-2-conditions/m-p/239048#M501610</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Stephen,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is not what i need! I need the intersection of customer of set1 and set2, not the union.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Mar 2011 11:07:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Match-2-conditions/m-p/239048#M501610</guid>
      <dc:creator />
      <dc:date>2011-03-04T11:07:14Z</dc:date>
    </item>
    <item>
      <title>Set Analysis - Match 2 conditions</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Match-2-conditions/m-p/239049#M501611</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try with this Method ,&lt;/P&gt;&lt;P&gt;In the Below Example Expression I have shown ' Premium Count ' , ' Product ' Wise for the year 2010 and 2009.&lt;/P&gt;&lt;P&gt;EXPRESSION : // Created 2 different expressions for year 2010 &amp;amp; 2009 and showed them in single BAR GRAPH.&lt;/P&gt;&lt;P&gt;2010 :&lt;/P&gt;&lt;P&gt;=sum({$&amp;lt;YearFin={$(vThisYear)}, MonthNum={"&amp;lt;=$(vThisMonth)"}&amp;gt;} CNT_MTD_NB)&lt;/P&gt;&lt;P&gt;2009:&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 0pt;mso-layout-grid-align:none;"&gt;=sum({$&amp;lt;YearFin={$(vPYear)}, MonthNum={"&amp;lt;=$(vThisMonth)"}&amp;gt;} CNT_MTD_NB)&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 0pt;mso-layout-grid-align:none;"&gt;&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 0pt;mso-layout-grid-align:none;"&gt;NOTE:&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 0pt;mso-layout-grid-align:none;"&gt;vThisYear : It is a variable created to show current year as on date.&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 0pt;mso-layout-grid-align:none;"&gt;vThisMonth : It is a variable created to show current month.&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 0pt;mso-layout-grid-align:none;"&gt;vPYear : It is a variable created to show previous year as on date.&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 0pt;mso-layout-grid-align:none;"&gt;&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 0pt;mso-layout-grid-align:none;"&gt;Regards&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 0pt;mso-layout-grid-align:none;"&gt;Bhargav Raj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Mar 2011 11:34:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Match-2-conditions/m-p/239049#M501611</guid>
      <dc:creator />
      <dc:date>2011-03-04T11:34:03Z</dc:date>
    </item>
    <item>
      <title>Set Analysis - Match 2 conditions</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Match-2-conditions/m-p/239050#M501612</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, elenagirardin,&lt;/P&gt;&lt;P&gt;I prefer, that Seasons are related to [Order Date]. If so, than you could manipulate only with dates.&lt;/P&gt;&lt;P&gt;Try to create 4 additional variables: vSeason1Start, vSeason1End, vSeason2Start, vSeason2End. You can put an expression in these variables to calculate correct end and start dates in format you need. Then your Set Analysis expression could look like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;Count({&amp;lt;[Order Date]={"&amp;gt;=$(#vSeason1Start)&amp;lt;=$(#vSeason1End)"} * {"&amp;gt;=$(#vSeason2Start)&amp;lt;=$(#vSeason2End)"}&amp;gt;} Distinct [Customer])&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Add single quotes for variables if you have Order dates in string.&lt;/P&gt;&lt;P&gt;Rgds,&lt;BR /&gt;AT&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Mar 2011 11:40:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Match-2-conditions/m-p/239050#M501612</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-03-04T11:40:36Z</dc:date>
    </item>
    <item>
      <title>Set Analysis - Match 2 conditions</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Match-2-conditions/m-p/239051#M501613</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot AT.&lt;/P&gt;&lt;P&gt;Unfortunately the Order Date is not related to Season....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Mar 2011 13:52:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Match-2-conditions/m-p/239051#M501613</guid>
      <dc:creator />
      <dc:date>2011-03-04T13:52:02Z</dc:date>
    </item>
    <item>
      <title>Set Analysis - Match 2 conditions</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Match-2-conditions/m-p/239052#M501614</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What a pity!&lt;/P&gt;&lt;P&gt;Than it looks like this case is little bit complicated.&lt;/P&gt;&lt;P&gt;AT&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Mar 2011 14:46:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Match-2-conditions/m-p/239052#M501614</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-03-04T14:46:26Z</dc:date>
    </item>
    <item>
      <title>Set Analysis - Match 2 conditions</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Match-2-conditions/m-p/239053#M501615</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Sorry, my misunderstanding.&lt;/P&gt;&lt;P&gt;You need the intersection of referential sets - e.g.:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;Sum({&amp;lt;Country=P({&amp;lt;Month={"Jan"}&amp;gt;} Country)*P({&amp;lt;Month={"Feb"}&amp;gt;} Country)&amp;gt;} Sales)&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;This gives me the Countries that both sales in January AND sales in February.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stephen&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Mar 2011 15:03:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Match-2-conditions/m-p/239053#M501615</guid>
      <dc:creator>stephencredmond</dc:creator>
      <dc:date>2011-03-04T15:03:46Z</dc:date>
    </item>
  </channel>
</rss>

