<?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: Peek function 3rd parameter issue in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Peek-function-3rd-parameter-issue/m-p/1012546#M343420</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Sunny... putting the third parameter variable in single quotes in my solution is working too...&lt;/P&gt;&lt;P&gt;But I got to learn about dynamically naming tables with alphanumeric values through your solution... I did not know that &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/silly.png" /&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot buddy...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 01 Feb 2016 06:50:53 GMT</pubDate>
    <dc:creator>ahbzshk07</dc:creator>
    <dc:date>2016-02-01T06:50:53Z</dc:date>
    <item>
      <title>Peek function 3rd parameter issue</title>
      <link>https://community.qlik.com/t5/QlikView/Peek-function-3rd-parameter-issue/m-p/1012543#M343417</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: trebuchet ms,geneva; font-size: 12pt;"&gt;Hello Everyone!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: trebuchet ms,geneva; font-size: 12pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: trebuchet ms,geneva; font-size: 12pt;"&gt;Can't we use variable in Peek() function at the place where we write table name (3rd parameter)?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: trebuchet ms,geneva; font-size: 12pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: trebuchet ms,geneva; font-size: 12pt;"&gt;If yes, then what is the problem in following code (please refer to the screenshot below)?&lt;BR /&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: trebuchet ms,geneva; font-size: 12pt;"&gt;&lt;IMG __jive_id="112974" alt="" class="jive-image image-1" height="268" src="https://community.qlik.com/legacyfs/online/112974_pastedImage_0.png" style="width: 765.714px; height: 268px;" width="766" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: trebuchet ms,geneva; font-size: 12pt;"&gt;The purpose is to get (26/01/2016 - 25/02/2016) for fieldname '1' (as per total number of days in January)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: trebuchet ms,geneva; font-size: 12pt;"&gt;(26/02/2016 - 25/03/2016) for fieldname '2' (for feb) and so on.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: trebuchet ms,geneva; font-size: 12pt;"&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: trebuchet ms,geneva; font-size: 12pt;"&gt;&lt;EM&gt;As far as I know, the table name must be written in single quotes.&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: trebuchet ms,geneva; font-size: 12pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: trebuchet ms,geneva; font-size: 12pt;"&gt;When I replace the darkened part in screenshot with &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: trebuchet ms,geneva; font-size: 12pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: trebuchet ms,geneva; font-size: 12pt;"&gt;&lt;STRONG&gt;if($(i)=2,'FisTab',if($(i)=3,'FisTab-1',if($(i)=4,'FisTab-2','further if conditions'))) ,&lt;/STRONG&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: trebuchet ms,geneva; font-size: 12pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: trebuchet ms,geneva; font-size: 12pt;"&gt;I get the desired output. But then the if condition becomes too lengthy to be likely used.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: trebuchet ms,geneva; font-size: 12pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: trebuchet ms,geneva; font-size: 12pt;"&gt;I am attaching the .qvw file. &lt;BR /&gt;&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: 12pt; font-family: trebuchet ms,geneva;"&gt;&lt;SPAN style="font-size: 12pt;"&gt;Regards.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jan 2016 13:02:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Peek-function-3rd-parameter-issue/m-p/1012543#M343417</guid>
      <dc:creator>ahbzshk07</dc:creator>
      <dc:date>2016-01-29T13:02:05Z</dc:date>
    </item>
    <item>
      <title>Re: Peek function 3rd parameter issue</title>
      <link>https://community.qlik.com/t5/QlikView/Peek-function-3rd-parameter-issue/m-p/1012544#M343418</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[FisTab-1]:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD Date(MakeDate(2016,01,25)+RecNo(),'DD/MM/YYYY') as 1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;AutoGenerate(Day(MonthEnd(MakeDate(Year(Today()),1,1))));&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Let tNum=1;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LET tName = 'FisTab-'&amp;amp;$(tNum);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LET tName1 = 'FisTab-'&amp;amp;($(tNum)+1);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FOR i=2 to 12&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[$(tName1)]:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD Date(MakeDate(Year(Today()), $(i), Day(Peek($(i)-1,-1,'$(tName)'))) + RecNo(),'DD/MM/YYYY') as $(i)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;AutoGenerate(Day(MonthEnd(MakeDate(Year(Today()),$(i),1))));&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;tNum=$(i)-1;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LET tName = 'FisTab-'&amp;amp;($(tNum)+1);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LET tName1 = 'FisTab-'&amp;amp;($(tNum)+2);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;NEXT i&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jan 2016 18:25:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Peek-function-3rd-parameter-issue/m-p/1012544#M343418</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-01-29T18:25:54Z</dc:date>
    </item>
    <item>
      <title>Re: Peek function 3rd parameter issue</title>
      <link>https://community.qlik.com/t5/QlikView/Peek-function-3rd-parameter-issue/m-p/1012545#M343419</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As Sunny has pointed out, the tablename parameter cannot be a calculated parameter. It must be a literal string. So doing the calculation into a variable as Sunny suggested should work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jan 2016 18:58:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Peek-function-3rd-parameter-issue/m-p/1012545#M343419</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2016-01-29T18:58:13Z</dc:date>
    </item>
    <item>
      <title>Re: Peek function 3rd parameter issue</title>
      <link>https://community.qlik.com/t5/QlikView/Peek-function-3rd-parameter-issue/m-p/1012546#M343420</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Sunny... putting the third parameter variable in single quotes in my solution is working too...&lt;/P&gt;&lt;P&gt;But I got to learn about dynamically naming tables with alphanumeric values through your solution... I did not know that &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/silly.png" /&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot buddy...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Feb 2016 06:50:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Peek-function-3rd-parameter-issue/m-p/1012546#M343420</guid>
      <dc:creator>ahbzshk07</dc:creator>
      <dc:date>2016-02-01T06:50:53Z</dc:date>
    </item>
    <item>
      <title>Re: Peek function 3rd parameter issue</title>
      <link>https://community.qlik.com/t5/QlikView/Peek-function-3rd-parameter-issue/m-p/1012547#M343421</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yeah, I was unaware of that... it being variable, I did not think of putting it in quotes...&lt;/P&gt;&lt;P&gt;Thanks buddy...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Feb 2016 06:53:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Peek-function-3rd-parameter-issue/m-p/1012547#M343421</guid>
      <dc:creator>ahbzshk07</dc:creator>
      <dc:date>2016-02-01T06:53:16Z</dc:date>
    </item>
  </channel>
</rss>

