<?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: Two (Probably Easy) Questions - 1-Set Analysis, 2-Timestamp Variable in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Two-Probably-Easy-Questions-1-Set-Analysis-2-Timestamp-Variable/m-p/849865#M298132</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you share the exact error that pops up when you run the script?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Apr 2015 13:29:38 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2015-04-16T13:29:38Z</dc:date>
    <item>
      <title>Two (Probably Easy) Questions - 1-Set Analysis, 2-Timestamp Variable</title>
      <link>https://community.qlik.com/t5/QlikView/Two-Probably-Easy-Questions-1-Set-Analysis-2-Timestamp-Variable/m-p/849861#M298128</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good day, everyone.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I working on an app and encountered two issues that I initially thought would be easy to solve.&amp;nbsp; Any help would be greatly appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="text-decoration: underline;"&gt;Issue #1:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I need to get the number of days difference between two dates it equals 0, 1, 2, 3, and &amp;gt;3.&amp;nbsp; I've tried many different variations of this expression (and others completely different).&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;=count({&amp;lt;MaxString([ASN Scan Date])-MinString([ASN Scan Date])=0&amp;gt;} Distinct([ASN Number]))&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Everything I try seems to get hung up on the Max-Min date part.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="text-decoration: underline;"&gt;Issue #2:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I'm loading hundreds of thousands of records from many tables.&amp;nbsp; To control the amount of data being retrieved, I use this statement:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;and rma.row_create_dt &amp;gt; '12-12-31 23:59:00.000'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;which works perfect.&amp;nbsp; However, there are many tables and I would like to use a variable in place of the date/time.&amp;nbsp; I use:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Let vstart = &lt;SPAN style="font-size: 13.3333330154419px;"&gt;'12-12-31 23:59:00.000', then &lt;SPAN style="font-size: 13.3333330154419px;"&gt;rma.row_create_dt &amp;gt; $(vstart).&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5em; font-size: 13.3333330154419px;"&gt;The script always stops, saying it doesn't recognize something.&amp;nbsp; What is wrong with the syntax?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Apr 2015 13:15:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-Probably-Easy-Questions-1-Set-Analysis-2-Timestamp-Variable/m-p/849861#M298128</guid>
      <dc:creator>jcampbell474</dc:creator>
      <dc:date>2015-04-16T13:15:12Z</dc:date>
    </item>
    <item>
      <title>Re: Two (Probably Easy) Questions - 1-Set Analysis, 2-Timestamp Variable</title>
      <link>https://community.qlik.com/t5/QlikView/Two-Probably-Easy-Questions-1-Set-Analysis-2-Timestamp-Variable/m-p/849862#M298129</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this may be for your 1st issue:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Aggr(Max([ASN Scan Date]), [ASN Number]) -&amp;nbsp; &lt;/STRONG&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;STRONG&gt;Aggr(Min([ASN Scan Date]), [ASN Number])&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Apr 2015 13:19:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-Probably-Easy-Questions-1-Set-Analysis-2-Timestamp-Variable/m-p/849862#M298129</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-04-16T13:19:17Z</dc:date>
    </item>
    <item>
      <title>Re: Two (Probably Easy) Questions - 1-Set Analysis, 2-Timestamp Variable</title>
      <link>https://community.qlik.com/t5/QlikView/Two-Probably-Easy-Questions-1-Set-Analysis-2-Timestamp-Variable/m-p/849863#M298130</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1: use interval() to find date difference.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try like&lt;/P&gt;&lt;P&gt;count(if(inteval(max([ASN Scan Date])-min([ASN Scan Date]),'D')=ComparingValue,distinct [ASN Number])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Apr 2015 13:20:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-Probably-Easy-Questions-1-Set-Analysis-2-Timestamp-Variable/m-p/849863#M298130</guid>
      <dc:creator>PrashantSangle</dc:creator>
      <dc:date>2015-04-16T13:20:43Z</dc:date>
    </item>
    <item>
      <title>Re: Two (Probably Easy) Questions - 1-Set Analysis, 2-Timestamp Variable</title>
      <link>https://community.qlik.com/t5/QlikView/Two-Probably-Easy-Questions-1-Set-Analysis-2-Timestamp-Variable/m-p/849864#M298131</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jason,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For Issue#2 try like this by using NUM()&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Let vstart =Num( &lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;'12-12-31 23:59:00.000'); &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;and in the condition write as&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt; Num(&lt;SPAN style="font-size: 13.3333330154419px;"&gt;rma.row_create_dt) &amp;gt; $(vstart)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;I think this may helpful to you.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Harsha Nandan&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Apr 2015 13:25:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-Probably-Easy-Questions-1-Set-Analysis-2-Timestamp-Variable/m-p/849864#M298131</guid>
      <dc:creator />
      <dc:date>2015-04-16T13:25:54Z</dc:date>
    </item>
    <item>
      <title>Re: Two (Probably Easy) Questions - 1-Set Analysis, 2-Timestamp Variable</title>
      <link>https://community.qlik.com/t5/QlikView/Two-Probably-Easy-Questions-1-Set-Analysis-2-Timestamp-Variable/m-p/849865#M298132</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you share the exact error that pops up when you run the script?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Apr 2015 13:29:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-Probably-Easy-Questions-1-Set-Analysis-2-Timestamp-Variable/m-p/849865#M298132</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-04-16T13:29:38Z</dc:date>
    </item>
    <item>
      <title>Re: Two (Probably Easy) Questions - 1-Set Analysis, 2-Timestamp Variable</title>
      <link>https://community.qlik.com/t5/QlikView/Two-Probably-Easy-Questions-1-Set-Analysis-2-Timestamp-Variable/m-p/849866#M298133</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This works, but it doesn't count the number of times the difference between dates meets specified criteria.&amp;nbsp; Ex. # of times = 0, # times = 1, etc...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&amp;nbsp; I didn't think to aggregate.&amp;nbsp; Certainly helps!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Apr 2015 13:29:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-Probably-Easy-Questions-1-Set-Analysis-2-Timestamp-Variable/m-p/849866#M298133</guid>
      <dc:creator>jcampbell474</dc:creator>
      <dc:date>2015-04-16T13:29:53Z</dc:date>
    </item>
    <item>
      <title>Re: Two (Probably Easy) Questions - 1-Set Analysis, 2-Timestamp Variable</title>
      <link>https://community.qlik.com/t5/QlikView/Two-Probably-Easy-Questions-1-Set-Analysis-2-Timestamp-Variable/m-p/849867#M298134</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This looks very promising, but QV doesn't like the syntax. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using:count(if(interval(max([ASN Scan Date])-min([ASN Scan Date]),'D')='0',distinct [ASN Number])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It doesn't like Distinct and one parenthesis is highlighted.&amp;nbsp; I couldn't figure out how solve either issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Apr 2015 13:32:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-Probably-Easy-Questions-1-Set-Analysis-2-Timestamp-Variable/m-p/849867#M298134</guid>
      <dc:creator>jcampbell474</dc:creator>
      <dc:date>2015-04-16T13:32:28Z</dc:date>
    </item>
    <item>
      <title>Re: Two (Probably Easy) Questions - 1-Set Analysis, 2-Timestamp Variable</title>
      <link>https://community.qlik.com/t5/QlikView/Two-Probably-Easy-Questions-1-Set-Analysis-2-Timestamp-Variable/m-p/849868#M298135</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What if you do something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;=Count(DISTINCT If(Aggr(Max([ASN Scan Date]), [ASN Number]) -&amp;nbsp; &lt;/STRONG&gt;&lt;SPAN style="font-size: 13.3333330154419px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-size: 13.3333320617676px; font-family: inherit;"&gt;Aggr(Min([ASN Scan Date]), [ASN Number]) = 0, [ASN Number]))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Sunny&lt;STRONG style="font-style: inherit; font-size: 13.3333320617676px; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Apr 2015 13:35:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-Probably-Easy-Questions-1-Set-Analysis-2-Timestamp-Variable/m-p/849868#M298135</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-04-16T13:35:18Z</dc:date>
    </item>
    <item>
      <title>Re: Two (Probably Easy) Questions - 1-Set Analysis, 2-Timestamp Variable</title>
      <link>https://community.qlik.com/t5/QlikView/Two-Probably-Easy-Questions-1-Set-Analysis-2-Timestamp-Variable/m-p/849869#M298136</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks!&amp;nbsp; Looks like I'm headed in the right direction, but QV is saying that Num is not recognized in the load script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SQL##f - SqlState: 37000, ErrorCode: 195, ErrorMsg: [Microsoft][ODBC SQL Server Driver][SQL Server]'Num' is not a recognized built-in function name.&lt;/P&gt;&lt;P&gt;SQL Select&lt;/P&gt;&lt;P&gt;rma_rows_id,&lt;/P&gt;&lt;P&gt;row_create_dt&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FROM XXX xxx with(NOLOCK)&lt;/P&gt;&lt;P&gt;WHERE rma.rows_id = 1111&lt;/P&gt;&lt;P&gt;and Num(rma.row_create_dt) &amp;gt; 41274.999305556&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Apr 2015 13:51:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-Probably-Easy-Questions-1-Set-Analysis-2-Timestamp-Variable/m-p/849869#M298136</guid>
      <dc:creator>jcampbell474</dc:creator>
      <dc:date>2015-04-16T13:51:34Z</dc:date>
    </item>
    <item>
      <title>Re: Two (Probably Easy) Questions - 1-Set Analysis, 2-Timestamp Variable</title>
      <link>https://community.qlik.com/t5/QlikView/Two-Probably-Easy-Questions-1-Set-Analysis-2-Timestamp-Variable/m-p/849870#M298137</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is it!&amp;nbsp; I had to add 'Floor' to round down the result being compared to 0 and it works like a charm!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is what I ultimately used: =Count(DISTINCT If(Floor(Aggr(Max([ASN Scan Date]), [ASN Number]) -&amp;nbsp; Aggr(Min([ASN Scan Date]), [ASN Number])) = 0, [ASN Number]))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many, many thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Apr 2015 14:02:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-Probably-Easy-Questions-1-Set-Analysis-2-Timestamp-Variable/m-p/849870#M298137</guid>
      <dc:creator>jcampbell474</dc:creator>
      <dc:date>2015-04-16T14:02:26Z</dc:date>
    </item>
    <item>
      <title>Re: Two (Probably Easy) Questions - 1-Set Analysis, 2-Timestamp Variable</title>
      <link>https://community.qlik.com/t5/QlikView/Two-Probably-Easy-Questions-1-Set-Analysis-2-Timestamp-Variable/m-p/849871#M298138</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Awesome! I am glad you were able to figure it out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Apr 2015 14:06:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-Probably-Easy-Questions-1-Set-Analysis-2-Timestamp-Variable/m-p/849871#M298138</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-04-16T14:06:10Z</dc:date>
    </item>
  </channel>
</rss>

