<?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: Set Analysis with Only function doesn't work in script. in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Only-function-doesn-t-work-in-script/m-p/627134#M230445</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Looking into your Excel source table, Id is not unique.&lt;/P&gt;&lt;P&gt;Peek() function as shown in my original sample won't duplicate your Id here.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 25 May 2014 21:50:23 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2014-05-25T21:50:23Z</dc:date>
    <item>
      <title>Set Analysis with Only function doesn't work in script.</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Only-function-doesn-t-work-in-script/m-p/627129#M230440</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 simple range table with amount and start range and End range.&lt;/P&gt;&lt;P&gt;When I select a range I want the range-1 and the range+1 given by the Id.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I use four varibles but my syntax works only in script :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;LET&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;/STRONG&gt;vUpStartEnd&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; = 'Only({&amp;lt;Id={$(=Id+1)}, StartEnd=&amp;gt;} StartEnd)';&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;LET&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;vDownStartEnd&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; = 'Only({&amp;lt;Id={$(=Id-1)}, StartEnd=&amp;gt;} StartEnd)';&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;LET&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;vUpAmount&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; = 'Only({&amp;lt;Id={$(=Id+1)}, StartEnd=&amp;gt;} Amount)';&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;LET&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;vDownAmount&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; = 'Only({&amp;lt;Id={$(=Id-1)}, StartEnd=&amp;gt;} Amount)';&lt;BR /&gt;Data:&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;LOAD&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; *,&lt;BR /&gt; '$(vUpStartEnd)' &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;UpStartEnd&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt; '$(vDownStartEnd)' &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;DownStartEnd&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt; '$(vUpAmount)' &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;UpAmount&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt; '$(vDownAmount)' &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;DownAmount&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;RESIDENT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; Data_Tmp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="font-size: 10pt;"&gt;I would like one table with my 4 varaibles. How can I achieve that ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 25 May 2014 08:54:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Only-function-doesn-t-work-in-script/m-p/627129#M230440</guid>
      <dc:creator>suzel404</dc:creator>
      <dc:date>2014-05-25T08:54:35Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with Only function doesn't work in script.</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Only-function-doesn-t-work-in-script/m-p/627130#M230441</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can't use set analysis in the script. But you can use peek() or previous() functions to access a preceding record's values, see attached sample.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to define a variable in the script, take care that QV will (try to) evaluate the dollar sign expansion before the variable value is assigned, that's why this doesn't work in your example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/thread/95021"&gt;Variable interpreted in script&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 25 May 2014 12:40:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Only-function-doesn-t-work-in-script/m-p/627130#M230441</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2014-05-25T12:40:47Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with Only function doesn't work in script.</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Only-function-doesn-t-work-in-script/m-p/627131#M230442</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You'll need to escape the $ in your script variable definitions to prevent them from getting expanded in the script. One way to do this is with the replace() function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;LET vUpStartEnd = replace('Only({&amp;lt;Id={@(=Id+1)}, StartEnd=&amp;gt;} StartEnd)','@','$');&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See attached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://masterssummit.com"&gt;http://masterssummit.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://robwunderlich.com"&gt;http://robwunderlich.com&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 25 May 2014 14:34:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Only-function-doesn-t-work-in-script/m-p/627131#M230442</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2014-05-25T14:34:14Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with Only function doesn't work in script.</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Only-function-doesn-t-work-in-script/m-p/627132#M230443</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Rob.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 25 May 2014 21:12:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Only-function-doesn-t-work-in-script/m-p/627132#M230443</guid>
      <dc:creator>suzel404</dc:creator>
      <dc:date>2014-05-25T21:12:04Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Set Analysis with Only function doesn't work in script.</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Only-function-doesn-t-work-in-script/m-p/627133#M230444</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Swehl,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I reproduce the syntax on the orginal table but I don't have the previous and next range.&lt;/P&gt;&lt;P&gt;For example, I select the chronotype =Type1 and the agglomerationType =TypeA&lt;/P&gt;&lt;P&gt;I can see the StartEnd. In particular I select the startEnd (2000-2500) and I can see previous (1500-2000) and forward StartEnd (2500-3250).&lt;/P&gt;&lt;P&gt;I need to create Peek function for StartEnd,Start,End,Money,Amount fields.&lt;/P&gt;&lt;P&gt;Previous/Forward : StartEnd,Start,End,Money,Amount.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I create Peek Function, I see duplicate Id. The Id field is unique and identifie Start, End, StartEnd, Money, Amount.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for you help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 25 May 2014 21:24:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Only-function-doesn-t-work-in-script/m-p/627133#M230444</guid>
      <dc:creator>suzel404</dc:creator>
      <dc:date>2014-05-25T21:24:51Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with Only function doesn't work in script.</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Only-function-doesn-t-work-in-script/m-p/627134#M230445</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Looking into your Excel source table, Id is not unique.&lt;/P&gt;&lt;P&gt;Peek() function as shown in my original sample won't duplicate your Id here.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 25 May 2014 21:50:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Only-function-doesn-t-work-in-script/m-p/627134#M230445</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2014-05-25T21:50:23Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with Only function doesn't work in script.</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Only-function-doesn-t-work-in-script/m-p/627135#M230446</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, Swehl. I didn't see that Id was duplicated. It is due to the intervalMatch.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 25 May 2014 22:52:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-Only-function-doesn-t-work-in-script/m-p/627135#M230446</guid>
      <dc:creator>suzel404</dc:creator>
      <dc:date>2014-05-25T22:52:52Z</dc:date>
    </item>
  </channel>
</rss>

