<?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 Need help/guidance in optimizing script functionality in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Need-help-guidance-in-optimizing-script-functionality/m-p/1216652#M389601</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 need help/guidance in optimizing script included in the attached word document. I have come up with this script in solution to question posted in &lt;A href="https://community.qlik.com/thread/242282"&gt;Arranging table data to formulate start date and end date from different records of same table&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The script response is good for a small set of source data but takes long time for a large data set.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was working on a time line chart related to this data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Currently there are few known issues to me in the script/chart that I've listed below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;First (217241) and Last (488058) record in the resulting data set is not getting data&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've attached data source (found on worksheet tab named - "HistDataSource") and resulting data set using the script in (worksheet named - "RestructuredHistData")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've included chart screen shots for time line chart and resulting data set table. In Time Line I'm using Max [TL Event] that is causing some of repetitive [TL Event] bar to be not displayed (Docs in Negotiation, Inactive)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="145820" alt="TLDataFor217242.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/145820_TLDataFor217242.png" style="width: 620px; height: 187px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="145821" alt="TL Chart for 217242.png" class="jive-image image-2" src="/legacyfs/online/145821_TL Chart for 217242.png" style="width: 620px; height: 192px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Max&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[TL Event]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[TL End Date Time]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) - &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Max&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[TL Event]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[TL Start Date Time]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Bar Offset&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Max&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[TL Event]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[TL Start Date Time]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanking in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 07 Dec 2016 01:05:58 GMT</pubDate>
    <dc:creator>vvira1316</dc:creator>
    <dc:date>2016-12-07T01:05:58Z</dc:date>
    <item>
      <title>Need help/guidance in optimizing script functionality</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-guidance-in-optimizing-script-functionality/m-p/1216652#M389601</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 need help/guidance in optimizing script included in the attached word document. I have come up with this script in solution to question posted in &lt;A href="https://community.qlik.com/thread/242282"&gt;Arranging table data to formulate start date and end date from different records of same table&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The script response is good for a small set of source data but takes long time for a large data set.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was working on a time line chart related to this data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Currently there are few known issues to me in the script/chart that I've listed below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;First (217241) and Last (488058) record in the resulting data set is not getting data&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've attached data source (found on worksheet tab named - "HistDataSource") and resulting data set using the script in (worksheet named - "RestructuredHistData")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've included chart screen shots for time line chart and resulting data set table. In Time Line I'm using Max [TL Event] that is causing some of repetitive [TL Event] bar to be not displayed (Docs in Negotiation, Inactive)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="145820" alt="TLDataFor217242.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/145820_TLDataFor217242.png" style="width: 620px; height: 187px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="145821" alt="TL Chart for 217242.png" class="jive-image image-2" src="/legacyfs/online/145821_TL Chart for 217242.png" style="width: 620px; height: 192px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Max&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[TL Event]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[TL End Date Time]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) - &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Max&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[TL Event]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[TL Start Date Time]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Bar Offset&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Max&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[TL Event]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[TL Start Date Time]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanking in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Dec 2016 01:05:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-guidance-in-optimizing-script-functionality/m-p/1216652#M389601</guid>
      <dc:creator>vvira1316</dc:creator>
      <dc:date>2016-12-07T01:05:58Z</dc:date>
    </item>
    <item>
      <title>Re: Need help/guidance in optimizing script functionality</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-guidance-in-optimizing-script-functionality/m-p/1216653#M389602</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I restructured script that helped me with optimization and brought down reload time drastically. I changed the size of table(s) that I was using in FOR ... NEXT loop to few records instead of the large table.&lt;IMG __jive_id="146239" alt="MultipleDocsOn TL.png" class="jive-image image-1" src="/legacyfs/online/146239_MultipleDocsOn TL.png" style="width: 620px; height: 118px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I want to get chart to display selected document instead of all documents.&lt;/P&gt;&lt;P&gt;Legends to be shown based on a dimension that is not one of dimension in charts dimension tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chart Dimensions&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800000;"&gt;Counterparty Document: Document ID&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800000;"&gt;TL Sequence&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BarExpression&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; =&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Num&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Max&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Counterparty Document: Document ID]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[TL Sequence]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[TL End Date Time]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) - &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Min&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Counterparty Document: Document ID]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[TL Sequence]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[TL Start Date Time]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),'#.#') &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BarOffset&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;IsNull&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;above&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Only&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Counterparty Document: Document ID]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;))), &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Min&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Counterparty Document: Document ID]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[TL Sequence]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[TL Start Date Time]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;RangeMax&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(0,&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Min&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Counterparty Document: Document ID]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[TL Sequence]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[TL Start Date Time]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)-&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;RangeMax&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;above&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Max&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Counterparty Document: Document ID]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[TL Sequence]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[TL End Date Time]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),1,&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;rowno&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;()-1))))&lt;BR /&gt; )&lt;BR /&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Axes&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Min&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Counterparty Document: Document ID]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[TL Start Date Time]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) - 5 &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Max&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Counterparty Document: Document ID]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[TL End Date Time]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) + 5 &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Dec 2016 22:15:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-guidance-in-optimizing-script-functionality/m-p/1216653#M389602</guid>
      <dc:creator>vvira1316</dc:creator>
      <dc:date>2016-12-09T22:15:49Z</dc:date>
    </item>
  </channel>
</rss>

