<?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 Re: Count if value does not exist in all previous rows in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Count-if-value-does-not-exist-in-all-previous-rows/m-p/1010411#M342891</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks &lt;A href="https://community.qlik.com/qlik-users/120618"&gt;MRKachhiaIMP&lt;/A&gt;‌, how would I do this in script when each row in script represents a Value and a single Date? I don't have the simplified monthly view.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e.g. &lt;/P&gt;&lt;P&gt;Date, Value&lt;/P&gt;&lt;P&gt;5/10/2015, xrw&lt;/P&gt;&lt;P&gt;5/10/2015, gtg&lt;/P&gt;&lt;P&gt;5/10/2015, sssw&lt;/P&gt;&lt;P&gt;6/10/2015, fdg&lt;/P&gt;&lt;P&gt;6/10/2015, fdg&lt;/P&gt;&lt;P&gt;6/10/2015, fdg&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not sure how to use peek or previous to check if value exists in previous month when the script is in single dates. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 10 Sep 2015 08:49:01 GMT</pubDate>
    <dc:creator>sifatnabil</dc:creator>
    <dc:date>2015-09-10T08:49:01Z</dc:date>
    <item>
      <title>Count if value does not exist in all previous rows</title>
      <link>https://community.qlik.com/t5/QlikView/Count-if-value-does-not-exist-in-all-previous-rows/m-p/1010409#M342889</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 time chart of values, i.e. time is dimension and count(distinct Value) in expression. How do I count in chart only the values that never appeared in &lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;al&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;l&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;STRONG style="text-decoration: underline;"&gt;previous&lt;/STRONG&gt; rows? e.g. from [Jan to Dec], if Value='xyz' appeared in Feb, and then in March, in the time chart, it should only count xyz in Feb and not again in March.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data looks like this:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="count previous rows.PNG" class="jive-image image-1" src="/legacyfs/online/98504_count previous rows.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The chart should be like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="count previous rows graph.png" class="jive-image image-2" src="/legacyfs/online/98506_count previous rows graph.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Sep 2015 08:41:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-if-value-does-not-exist-in-all-previous-rows/m-p/1010409#M342889</guid>
      <dc:creator>sifatnabil</dc:creator>
      <dc:date>2015-09-10T08:41:01Z</dc:date>
    </item>
    <item>
      <title>Re: Count if value does not exist in all previous rows</title>
      <link>https://community.qlik.com/t5/QlikView/Count-if-value-does-not-exist-in-all-previous-rows/m-p/1010410#M342890</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to count this in script itselt.. !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Sep 2015 08:43:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-if-value-does-not-exist-in-all-previous-rows/m-p/1010410#M342890</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2015-09-10T08:43:45Z</dc:date>
    </item>
    <item>
      <title>Re: Count if value does not exist in all previous rows</title>
      <link>https://community.qlik.com/t5/QlikView/Count-if-value-does-not-exist-in-all-previous-rows/m-p/1010411#M342891</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks &lt;A href="https://community.qlik.com/qlik-users/120618"&gt;MRKachhiaIMP&lt;/A&gt;‌, how would I do this in script when each row in script represents a Value and a single Date? I don't have the simplified monthly view.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e.g. &lt;/P&gt;&lt;P&gt;Date, Value&lt;/P&gt;&lt;P&gt;5/10/2015, xrw&lt;/P&gt;&lt;P&gt;5/10/2015, gtg&lt;/P&gt;&lt;P&gt;5/10/2015, sssw&lt;/P&gt;&lt;P&gt;6/10/2015, fdg&lt;/P&gt;&lt;P&gt;6/10/2015, fdg&lt;/P&gt;&lt;P&gt;6/10/2015, fdg&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not sure how to use peek or previous to check if value exists in previous month when the script is in single dates. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Sep 2015 08:49:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-if-value-does-not-exist-in-all-previous-rows/m-p/1010411#M342891</guid>
      <dc:creator>sifatnabil</dc:creator>
      <dc:date>2015-09-10T08:49:01Z</dc:date>
    </item>
    <item>
      <title>Re: Count if value does not exist in all previous rows</title>
      <link>https://community.qlik.com/t5/QlikView/Count-if-value-does-not-exist-in-all-previous-rows/m-p/1010412#M342892</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14418765822423338" jivemacro_uid="_14418765822423338"&gt;
&lt;P&gt;Temp:&lt;/P&gt;
&lt;P&gt;Load&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Date(Date#(Date,'M/DD/YYYY')) as Date,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Value&lt;/P&gt;
&lt;P&gt;Inline&lt;/P&gt;
&lt;P&gt;[&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Date, Value&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 1/10/2015, abc&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 1/10/2015, adf&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 1/10/2015, aer&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 2/10/2015, abc&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 2/10/2015, adf&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 2/10/2015, aer&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 2/10/2015, xyz&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 3/10/2015, abc&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 3/10/2015, adf&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 3/10/2015, aer&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 3/10/2015, xyz&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 4/10/2015, abc&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 4/10/2015, adf&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 4/10/2015, aer&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 4/10/2015, xyz&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 4/10/2015, yyy&lt;/P&gt;
&lt;P&gt;];&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Final:&lt;/P&gt;
&lt;P&gt;Load&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Value,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; If(Previous(Value)=Value,0,1) as Count,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Month(Date) as Month,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Date &lt;/P&gt;
&lt;P&gt;Resident Temp&lt;/P&gt;
&lt;P&gt;Order By Value, Date;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Drop Table Temp;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now create a Straight Table&lt;/P&gt;&lt;P&gt;Dimension&lt;/P&gt;&lt;P&gt;Month&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression&lt;/P&gt;&lt;P&gt;SUM(Count)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Presentation Tab..&lt;/P&gt;&lt;P&gt;Untick Suppress Zero Values&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Sep 2015 09:17:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-if-value-does-not-exist-in-all-previous-rows/m-p/1010412#M342892</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2015-09-10T09:17:00Z</dc:date>
    </item>
    <item>
      <title>Re: Count if value does not exist in all previous rows</title>
      <link>https://community.qlik.com/t5/QlikView/Count-if-value-does-not-exist-in-all-previous-rows/m-p/1010413#M342893</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks! This worked. I understood that sorting by Value and then Date made the previous() function work correctly. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Sep 2015 04:30:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-if-value-does-not-exist-in-all-previous-rows/m-p/1010413#M342893</guid>
      <dc:creator>sifatnabil</dc:creator>
      <dc:date>2015-09-14T04:30:20Z</dc:date>
    </item>
  </channel>
</rss>

