<?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 Fix timeframe with set analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Fix-timeframe-with-set-analysis/m-p/589819#M1098795</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;With the following formula, I calculated in my Qlikview document how many minutes trucks that were supposed to unload, and didn't give a status update yet, were late:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=(Avg({&amp;lt;stp_status={[OPN&amp;gt;}now())-Avg({&amp;lt;stp_status={[OPN]}&amp;gt;}stp_schdtlatest))*1440&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So stp_status OPN means they didnt give an update yet, and stp_schdtlatest is the latest time the truck was allowed to arrive.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used to limit the timeframe in my script, so I would only get data from yesterday, today, and tomorrow.&lt;/P&gt;&lt;P&gt;(with: "Where stp_schdtlatest&amp;gt;getdate()-1 and stp_schdtlatest&amp;lt;getdate()+1 &lt;SPAN style="color: #575757; font-size: 10pt; font-family: 'Tahoma','sans-serif';"&gt;and stp_event='unload'&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, now I need to show how many minutes late the LOADING trucks are too. My dataset contains information with unloading and loading information from trucks. There are many different places for loading as well as for unloading. So it's not like I have just information from one site with incoming trucks. So now I cannot limit the timeframe in my script to trucks unloading from yesterday to tomorrow anymore, because then I'll filter out the trucks that will be loaded today and will only be unloaded 4 days from now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So basically I have to limit the timeframe in my data now using set analysis, so it will only show data from yesterday, today, and tomorrow. Could anybody adjust the formula on top so it does this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Niek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 17 Apr 2014 09:16:35 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-04-17T09:16:35Z</dc:date>
    <item>
      <title>Fix timeframe with set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Fix-timeframe-with-set-analysis/m-p/589819#M1098795</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;With the following formula, I calculated in my Qlikview document how many minutes trucks that were supposed to unload, and didn't give a status update yet, were late:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=(Avg({&amp;lt;stp_status={[OPN&amp;gt;}now())-Avg({&amp;lt;stp_status={[OPN]}&amp;gt;}stp_schdtlatest))*1440&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So stp_status OPN means they didnt give an update yet, and stp_schdtlatest is the latest time the truck was allowed to arrive.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used to limit the timeframe in my script, so I would only get data from yesterday, today, and tomorrow.&lt;/P&gt;&lt;P&gt;(with: "Where stp_schdtlatest&amp;gt;getdate()-1 and stp_schdtlatest&amp;lt;getdate()+1 &lt;SPAN style="color: #575757; font-size: 10pt; font-family: 'Tahoma','sans-serif';"&gt;and stp_event='unload'&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, now I need to show how many minutes late the LOADING trucks are too. My dataset contains information with unloading and loading information from trucks. There are many different places for loading as well as for unloading. So it's not like I have just information from one site with incoming trucks. So now I cannot limit the timeframe in my script to trucks unloading from yesterday to tomorrow anymore, because then I'll filter out the trucks that will be loaded today and will only be unloaded 4 days from now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So basically I have to limit the timeframe in my data now using set analysis, so it will only show data from yesterday, today, and tomorrow. Could anybody adjust the formula on top so it does this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Niek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Apr 2014 09:16:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Fix-timeframe-with-set-analysis/m-p/589819#M1098795</guid>
      <dc:creator />
      <dc:date>2014-04-17T09:16:35Z</dc:date>
    </item>
    <item>
      <title>Re: Fix timeframe with set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Fix-timeframe-with-set-analysis/m-p/589820#M1098796</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you provide some little sample data?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Apr 2014 09:19:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Fix-timeframe-with-set-analysis/m-p/589820#M1098796</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-04-17T09:19:26Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Fix timeframe with set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Fix-timeframe-with-set-analysis/m-p/589821#M1098797</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Manish,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have my file directly connected to my companies database, so I cannot send you the data as I use it. We also have a program to pull data from the database, you can find the output attached. Below you can see how the data looks in the transport planning software: in the upperhalf the planned loading date+time and unloading date+time, in the lowerhalf the actual loading date+time and unloading date+time. The 'A's, under Est in the lowerhalf, shows if it is still open (E) or closed (A).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hopefully this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="TMW screenshot.JPG" class="jive-image" src="/legacyfs/online/57497_TMW screenshot.JPG" style="width: 620px; height: 257px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Niek&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Apr 2014 09:37:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Fix-timeframe-with-set-analysis/m-p/589821#M1098797</guid>
      <dc:creator />
      <dc:date>2014-04-17T09:37:28Z</dc:date>
    </item>
    <item>
      <title>Re: Fix timeframe with set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Fix-timeframe-with-set-analysis/m-p/589822#M1098798</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I can't find &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.800000190734863px;"&gt;stp_status &amp;amp; &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.800000190734863px;"&gt;stp_schdtlatest here&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Apr 2014 09:46:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Fix-timeframe-with-set-analysis/m-p/589822#M1098798</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-04-17T09:46:12Z</dc:date>
    </item>
    <item>
      <title>Re: Fix timeframe with set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Fix-timeframe-with-set-analysis/m-p/589823#M1098799</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Stp_status is not in the attached file, stp_schdtlatest is a combination of these two fields:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="WIDTH: 350px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD height="20" width="174"&gt;Sched Delivery Latest Date&lt;/TD&gt;&lt;TD width="176"&gt;Sched Delivery Latest Time&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Like I said; this is the output of a program we have; it translates the database in an understandable format, with preselected fields. So it's only use is to give you some more understanding of the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Niek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Apr 2014 09:52:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Fix-timeframe-with-set-analysis/m-p/589823#M1098799</guid>
      <dc:creator />
      <dc:date>2014-04-17T09:52:04Z</dc:date>
    </item>
  </channel>
</rss>

