<?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 Multiple Count( IF statements in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Multiple-Count-IF-statements/m-p/159458#M34091</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could create a flag in the Script&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;Temp_Map:Mapping LoadCustomer,max(Date)from DataSourceGroup By Customer;&lt;BR /&gt;&lt;BR /&gt;LoadID,Customer,Item,Date,if(applymap('Temp_Map', Customer) &amp;gt;= addmonths(today(),-3),1,0) as PurchasedInLast3MonthsFlagfrom DataSource;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;You can then use then use the flag in the chart&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 20 May 2010 17:38:48 GMT</pubDate>
    <dc:creator>jedgson</dc:creator>
    <dc:date>2010-05-20T17:38:48Z</dc:date>
    <item>
      <title>Multiple Count( IF statements</title>
      <link>https://community.qlik.com/t5/QlikView/Multiple-Count-IF-statements/m-p/159457#M34090</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;My data has the following structure for transactions:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ID Customer Item Date&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I am developing a graph that analyses how many buyers are active, how many are lapsed and how many were reinstated.&lt;/P&gt;&lt;P&gt;For the active buyers I am using the following statement in the expression of a bar chart:&lt;/P&gt;&lt;P&gt;=COUNT(DISTINCT IF(Inmonth(Date,now(),-1),Customer,null()))&lt;/P&gt;&lt;P&gt;For the lapsed ones I would like to select all that did not buy in the last three months, but I can't figure out how.&lt;/P&gt;&lt;P&gt;For the reinstated ones I would like to count how many customers have purchased in the last month, although they had not purchased anything in the previous 3 months. I just can't find the way to do this either.&lt;/P&gt;&lt;P&gt;Any suggestions?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 May 2010 17:22:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multiple-Count-IF-statements/m-p/159457#M34090</guid>
      <dc:creator />
      <dc:date>2010-05-20T17:22:48Z</dc:date>
    </item>
    <item>
      <title>Multiple Count( IF statements</title>
      <link>https://community.qlik.com/t5/QlikView/Multiple-Count-IF-statements/m-p/159458#M34091</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could create a flag in the Script&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;Temp_Map:Mapping LoadCustomer,max(Date)from DataSourceGroup By Customer;&lt;BR /&gt;&lt;BR /&gt;LoadID,Customer,Item,Date,if(applymap('Temp_Map', Customer) &amp;gt;= addmonths(today(),-3),1,0) as PurchasedInLast3MonthsFlagfrom DataSource;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;You can then use then use the flag in the chart&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 May 2010 17:38:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multiple-Count-IF-statements/m-p/159458#M34091</guid>
      <dc:creator>jedgson</dc:creator>
      <dc:date>2010-05-20T17:38:48Z</dc:date>
    </item>
  </channel>
</rss>

