<?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 Filter transformation on a resident table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Filter-transformation-on-a-resident-table/m-p/214191#M67746</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;When Peek() is called without the table parameter, nor the index number, it takes the last loaded value for the field specified. In this case, is exactly what I'm looking for, that is, the last value for Period of the current table, even when it is being loaded.&lt;/P&gt;&lt;P&gt;There's no "next period" actually, because the next record is never loaded yet, that's why I'm ordering the table in descending order (Step1) so you know the previous (last loaded) value of Period.&lt;/P&gt;&lt;P&gt;Glad to help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 Apr 2011 19:52:18 GMT</pubDate>
    <dc:creator>Miguel_Angel_Baeyens</dc:creator>
    <dc:date>2011-04-13T19:52:18Z</dc:date>
    <item>
      <title>Filter transformation on a resident table</title>
      <link>https://community.qlik.com/t5/QlikView/Filter-transformation-on-a-resident-table/m-p/214185#M67740</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Is it possible to do a filter transformation on a resident table?&lt;/P&gt;&lt;P&gt;When you load an Excel file through the wizard, you get the "Enable Transformation Step" option. When you finish the wizard it puts something like this at the end of your statement:&lt;/P&gt;&lt;P&gt;(biff, embedded labels, table is Sheet1$, filters(Replace(2, bottom, StrCnd(null))))&lt;/P&gt;&lt;P&gt;I want to do just this, but then to a resident table. If I would put it in pseudo code it would look something like this:&lt;/P&gt;&lt;P&gt;LOAD *&lt;BR /&gt;RESIDENT(MyTable)&lt;BR /&gt;(filters(Replace(1, bottom, StrCnd(null))));&lt;/P&gt;&lt;P&gt;Or directly from the SQL:&lt;/P&gt;&lt;P&gt;LOAD *;&lt;BR /&gt;SQL SELECT * FROM MyTable&lt;BR /&gt;(filters(Replace(1, bottom, StrCnd(null))));&lt;/P&gt;&lt;P&gt;I can of course store the file in a QVD and then load it as a table file. This does allow me to use the transformation options. Is this the only way or is it possible to do it directly?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Apr 2011 15:07:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Filter-transformation-on-a-resident-table/m-p/214185#M67740</guid>
      <dc:creator />
      <dc:date>2011-04-13T15:07:58Z</dc:date>
    </item>
    <item>
      <title>Filter transformation on a resident table</title>
      <link>https://community.qlik.com/t5/QlikView/Filter-transformation-on-a-resident-table/m-p/214186#M67741</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Filters() are only appllied to text files or QVD files when using the transformation step. Since you are loading from a file, and unless there is no other way to do that, I'd use any QlikView function in the LOAD part of the script.&lt;/P&gt;&lt;P&gt;The SELECT part is not bound to work with "filters()" since it's a QlikView function, not a SQL database function, so in this part only SQL statements that would work in your query analyzer will be accepted (besides the driver constraints).&lt;/P&gt;&lt;P&gt;What do you want to get exactly?&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Apr 2011 15:16:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Filter-transformation-on-a-resident-table/m-p/214186#M67741</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2011-04-13T15:16:17Z</dc:date>
    </item>
    <item>
      <title>Filter transformation on a resident table</title>
      <link>https://community.qlik.com/t5/QlikView/Filter-transformation-on-a-resident-table/m-p/214187#M67742</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Take the two tables in the image below:&lt;/P&gt;&lt;P&gt;&lt;A href="http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Discussions.Components.Files/11/0143.tables.JPG"&gt;&lt;IMG alt="" border="0" src="http://community.qlik.com/resized-image.ashx/__size/550x0/__key/CommunityServer.Discussions.Components.Files/11/0143.tables.JPG" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table 1&lt;/STRONG&gt; is what I have and &lt;STRONG&gt;Table 2&lt;/STRONG&gt; is what I want. If you would have this in an Excel file you could easily use the fill. It looks like I have to do some fancy SQL stuff to make it come out like table 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Apr 2011 15:32:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Filter-transformation-on-a-resident-table/m-p/214187#M67742</guid>
      <dc:creator />
      <dc:date>2011-04-13T15:32:58Z</dc:date>
    </item>
    <item>
      <title>Filter transformation on a resident table</title>
      <link>https://community.qlik.com/t5/QlikView/Filter-transformation-on-a-resident-table/m-p/214188#M67743</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you should see this&lt;/P&gt;&lt;P&gt;http://community.qlik.com/wikis/qlikview-wiki/using-peek-and-previous-functions-recursively-to-help-transform-data.aspx&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Apr 2011 15:40:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Filter-transformation-on-a-resident-table/m-p/214188#M67743</guid>
      <dc:creator />
      <dc:date>2011-04-13T15:40:27Z</dc:date>
    </item>
    <item>
      <title>Filter transformation on a resident table</title>
      <link>https://community.qlik.com/t5/QlikView/Filter-transformation-on-a-resident-table/m-p/214189#M67744</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Check the following example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;Data:LOAD * INLINE [Datekey, Period201101012011020120110301, 1201104012011050120110601, 2]; Step1:NOCONCATENATE LOAD *RESIDENT DataORDER BY Datekey DESC; DROP TABLE Data; Step2:NOCONCATENATE LOAD Datekey, If(Len(Period) = 0, Peek('Period'), Period) AS PeriodRESIDENT Step1; DROP TABLE Step1;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Anyway, I'm assuming that that data is date related, so I'd use a function to get the quarter depending on the date:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;Data:LOAD Date(Date#(Datekey, 'YYYYMMDD')) AS Datekey, Div(Month(Date(Date#(Datekey, 'YYYYMMDD'))) +2, 3) AS Period INLINE [Datekey201101012011020120110301201104012011050120110601];&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Even if that's the data, a string function.&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Apr 2011 15:56:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Filter-transformation-on-a-resident-table/m-p/214189#M67744</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2011-04-13T15:56:10Z</dc:date>
    </item>
    <item>
      <title>Filter transformation on a resident table</title>
      <link>https://community.qlik.com/t5/QlikView/Filter-transformation-on-a-resident-table/m-p/214190#M67745</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;@Muncho: Thanks that does look like a way to go if you have no field that implies any order. I'd still have to change it a bit because this fills the values above. I have to fill the values below.&lt;/P&gt;&lt;P&gt;@Miguel: Thanks for your replies. Your sample code works like a charm. Can you elaborate on the use of the peek function? It is quite clear what it does when you call the function with all three parameters. But what happens here, when calling it with only one? Howcome it contains the next period?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Apr 2011 16:42:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Filter-transformation-on-a-resident-table/m-p/214190#M67745</guid>
      <dc:creator />
      <dc:date>2011-04-13T16:42:36Z</dc:date>
    </item>
    <item>
      <title>Filter transformation on a resident table</title>
      <link>https://community.qlik.com/t5/QlikView/Filter-transformation-on-a-resident-table/m-p/214191#M67746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;When Peek() is called without the table parameter, nor the index number, it takes the last loaded value for the field specified. In this case, is exactly what I'm looking for, that is, the last value for Period of the current table, even when it is being loaded.&lt;/P&gt;&lt;P&gt;There's no "next period" actually, because the next record is never loaded yet, that's why I'm ordering the table in descending order (Step1) so you know the previous (last loaded) value of Period.&lt;/P&gt;&lt;P&gt;Glad to help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Apr 2011 19:52:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Filter-transformation-on-a-resident-table/m-p/214191#M67746</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2011-04-13T19:52:18Z</dc:date>
    </item>
    <item>
      <title>Filter transformation on a resident table</title>
      <link>https://community.qlik.com/t5/QlikView/Filter-transformation-on-a-resident-table/m-p/214192#M67747</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I did not know peek could be used in this way: powerfull function!&lt;/P&gt;&lt;P&gt;In your second code block you suggest deriving the period from the date. This does seem logical, but in my case the period cannot be extracted from the date.&lt;/P&gt;&lt;P&gt;Thanks for your help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Apr 2011 12:49:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Filter-transformation-on-a-resident-table/m-p/214192#M67747</guid>
      <dc:creator />
      <dc:date>2011-04-14T12:49:17Z</dc:date>
    </item>
  </channel>
</rss>

