<?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 Count Flag where date is greater than date X in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Count-Flag-where-date-is-greater-than-date-X/m-p/12131#M1961</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a Flag &lt;STRONG&gt;[Last6TradeWeeks] &lt;/STRONG&gt;which always has 42 day's marked as &lt;STRONG&gt;{'1'}&lt;/STRONG&gt; the rest are&lt;STRONG&gt; {'0'}.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;If I &lt;STRONG&gt;Count({1&amp;lt;[Last6TradeWeeks]={'1'}&amp;gt;}TOTAL Last6TradeWeeks) &lt;/STRONG&gt;I always get back 42.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I want to add in here is, based off a date &lt;STRONG&gt;[First Sale Date]&lt;/STRONG&gt; to count all the flagged day's greater than and equal to this date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, if &lt;STRONG&gt;[First Sale Date] &lt;/STRONG&gt;was the 01/06/2018 and &lt;STRONG&gt;[Last6TradeWeeks] &lt;/STRONG&gt;ended on the 10/06/2018. Then a count of the &lt;STRONG&gt;[Last6TradeWeeks] = {'1'}&lt;/STRONG&gt; should equal &lt;STRONG&gt;10&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The issue i am coming across is that my calculations always seem to only count day's that have had a sale on it for an individual item.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Note: This value will be used to work out the average QTY sold per day within this period.&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 12 Jun 2018 06:40:46 GMT</pubDate>
    <dc:creator>ashleywooldridg</dc:creator>
    <dc:date>2018-06-12T06:40:46Z</dc:date>
    <item>
      <title>Count Flag where date is greater than date X</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Flag-where-date-is-greater-than-date-X/m-p/12131#M1961</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a Flag &lt;STRONG&gt;[Last6TradeWeeks] &lt;/STRONG&gt;which always has 42 day's marked as &lt;STRONG&gt;{'1'}&lt;/STRONG&gt; the rest are&lt;STRONG&gt; {'0'}.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;If I &lt;STRONG&gt;Count({1&amp;lt;[Last6TradeWeeks]={'1'}&amp;gt;}TOTAL Last6TradeWeeks) &lt;/STRONG&gt;I always get back 42.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I want to add in here is, based off a date &lt;STRONG&gt;[First Sale Date]&lt;/STRONG&gt; to count all the flagged day's greater than and equal to this date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, if &lt;STRONG&gt;[First Sale Date] &lt;/STRONG&gt;was the 01/06/2018 and &lt;STRONG&gt;[Last6TradeWeeks] &lt;/STRONG&gt;ended on the 10/06/2018. Then a count of the &lt;STRONG&gt;[Last6TradeWeeks] = {'1'}&lt;/STRONG&gt; should equal &lt;STRONG&gt;10&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The issue i am coming across is that my calculations always seem to only count day's that have had a sale on it for an individual item.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Note: This value will be used to work out the average QTY sold per day within this period.&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jun 2018 06:40:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Flag-where-date-is-greater-than-date-X/m-p/12131#M1961</guid>
      <dc:creator>ashleywooldridg</dc:creator>
      <dc:date>2018-06-12T06:40:46Z</dc:date>
    </item>
    <item>
      <title>Re: Count Flag where date is greater than date X</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Flag-where-date-is-greater-than-date-X/m-p/12132#M1962</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Would you be able to share a sample to show the issue? It might be easier to help with a sample to see what you have and what you might need to change in order to get what you want&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jun 2018 11:58:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Flag-where-date-is-greater-than-date-X/m-p/12132#M1962</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-06-12T11:58:07Z</dc:date>
    </item>
    <item>
      <title>Re: Count Flag where date is greater than date X</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Flag-where-date-is-greater-than-date-X/m-p/12133#M1963</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have attached an example document with the issue shown.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Table on the right shows the data as i have it in my current application.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have thought that I may need to utilize an if statement, but am hoping there is a better way to do what i want.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jun 2018 22:29:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Flag-where-date-is-greater-than-date-X/m-p/12133#M1963</guid>
      <dc:creator>ashleywooldridg</dc:creator>
      <dc:date>2018-06-12T22:29:15Z</dc:date>
    </item>
    <item>
      <title>Re: Count Flag where date is greater than date X</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Flag-where-date-is-greater-than-date-X/m-p/12134#M1964</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be using this...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Count(TOTAL DISTINCT {1&amp;lt;Last6TradeWeeks={'1'}&amp;gt; * $&amp;lt;Date={'&amp;gt;=$(=[First Sale Date])'}&amp;gt;} Date)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But this will be an issue when you will have more then one item to look at... because the 10 you were counting didn't have Coffee Mug on all the rows and I had to use TOTAL function. This worked when there is only one item, but when you have more than 1, I am not sure how you would want to see&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jun 2018 08:57:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Flag-where-date-is-greater-than-date-X/m-p/12134#M1964</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-06-13T08:57:59Z</dc:date>
    </item>
    <item>
      <title>Re: Count Flag where date is greater than date X</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Flag-where-date-is-greater-than-date-X/m-p/12135#M1965</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Sunny, I managed to get this at one point, but found the issue you pointed out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have gone another direction at the moment, not sure if it is the best method, but will use IF statements to make allowances where required.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The below gives me the required number of total day's between certain date's and i'll use IF based off the &lt;STRONG&gt;[First Sale Date]&lt;/STRONG&gt; to determine what to subtract the &lt;STRONG&gt;Max([Sale Date])&lt;/STRONG&gt; by, if a sale has been made.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; =(Floor('$(=Max({1&amp;lt;[Last6TradeWeeks]={'1'}&amp;gt;} [Sale Date]))') - &lt;EM style="text-decoration: underline;"&gt;Floor([First Sale Date])&lt;/EM&gt;)+1&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jun 2018 01:39:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Flag-where-date-is-greater-than-date-X/m-p/12135#M1965</guid>
      <dc:creator>ashleywooldridg</dc:creator>
      <dc:date>2018-06-14T01:39:13Z</dc:date>
    </item>
  </channel>
</rss>

