<?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: Order cycle in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Order-cycle/m-p/425361#M158436</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could calculate this in the script or with expressions in a chart. See attached qvw&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;edit: try this expression for the minimum interval&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;min(total &amp;lt;Company&amp;gt; aggr(OrderDate-above(OrderDate),Company,OrderDate))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;for maximimum and average use the max and avg functions instead of min. You'll have to make sure your dates are ordered ascending or you're going to get funny figures.&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 04 May 2013 07:47:01 GMT</pubDate>
    <dc:creator>Gysbert_Wassenaar</dc:creator>
    <dc:date>2013-05-04T07:47:01Z</dc:date>
    <item>
      <title>Order cycle</title>
      <link>https://community.qlik.com/t5/QlikView/Order-cycle/m-p/425360#M158435</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello, all:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To see ordering trends, I'd like to compute the minimum, maxiumum and average date differences between two adjacent orders.And then the cycles can be shown in a line chart. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="40440" class="jive-image" alt="order1.JPG" src="https://community.qlik.com/legacyfs/online/40440_order1.JPG" /&gt;&lt;/P&gt;&lt;P&gt;From above, for company 3, min. order cycle=1 day(2-23 minus 2-22), max.cycle=4 days(2-22 mimus 2-18), and avg cycle≈2.33 days.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've set the dimension as "customer". Anyone can help to suggest an expressions? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 May 2013 03:07:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Order-cycle/m-p/425360#M158435</guid>
      <dc:creator />
      <dc:date>2013-05-04T03:07:30Z</dc:date>
    </item>
    <item>
      <title>Re: Order cycle</title>
      <link>https://community.qlik.com/t5/QlikView/Order-cycle/m-p/425361#M158436</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could calculate this in the script or with expressions in a chart. See attached qvw&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;edit: try this expression for the minimum interval&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;min(total &amp;lt;Company&amp;gt; aggr(OrderDate-above(OrderDate),Company,OrderDate))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;for maximimum and average use the max and avg functions instead of min. You'll have to make sure your dates are ordered ascending or you're going to get funny figures.&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 May 2013 07:47:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Order-cycle/m-p/425361#M158436</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-05-04T07:47:01Z</dc:date>
    </item>
    <item>
      <title>Re: Order cycle</title>
      <link>https://community.qlik.com/t5/QlikView/Order-cycle/m-p/425362#M158437</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;STRONG class="font-color-meta"&gt;&lt;SPAN class="replyToName"&gt;Gysbert:&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you. But I'm trying the personal edition, unable to open ur qvw. Could u pls write out the script or expression here?&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 May 2013 08:15:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Order-cycle/m-p/425362#M158437</guid>
      <dc:creator />
      <dc:date>2013-05-04T08:15:31Z</dc:date>
    </item>
    <item>
      <title>Re: Order cycle</title>
      <link>https://community.qlik.com/t5/QlikView/Order-cycle/m-p/425363#M158438</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It works. Thanks a ton.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the dimension is a expression rather than field name, it seems the expression can not get the right results. Did you have a test on it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e.g. In my case, if company 1 and company 2 are associated. I may need to get the minimum order cycle from the group companies. Then I supposed:&amp;nbsp; &lt;EM&gt;min(total &amp;lt;if(Customer="Company1" or Customer="Company2", "Group1", If(Customer="Company3","Group2","Group3"))&amp;gt; aggr(OrderDate-above(OrderDate),&lt;/EM&gt;&lt;EM&gt;if(Customer="Company1" or Customer="Company2", "Group1", If(Customer="Company3","Group2","Group3"))&lt;/EM&gt;&lt;EM&gt;,OrderDate))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 05 May 2013 02:42:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Order-cycle/m-p/425363#M158438</guid>
      <dc:creator />
      <dc:date>2013-05-05T02:42:45Z</dc:date>
    </item>
  </channel>
</rss>

