<?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: SCD in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/SCD/m-p/850755#M298405</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Swuehi and Jagan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your kind help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Both of your solution works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But can anyone explain me what exactly is been done in the query above to get the required result, as I can add this to my learning being a new person to QlikView.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 18 Jun 2015 11:03:22 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-06-18T11:03:22Z</dc:date>
    <item>
      <title>SCD</title>
      <link>https://community.qlik.com/t5/QlikView/SCD/m-p/850752#M298402</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Hi Team,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Kindly help me resolve the following query using the SCD solution&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Well, I have the following Inline table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LOAD * INLINE&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;[&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Product, ProdName, Price, Updated&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 123, Watch, 150$, 1/1/2015&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 134, Fruit, 30$, 1/1/2015&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 145, Ring, 3000$, 3/1/2015&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 123, Watch, 125$, 5/1/2015&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 123, Watch, 119$, 5/5/2015&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 134, Fruit , 50$, 5/5/2015&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 145, Ring, 2500$, 5/12/2015&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 234, Pen, 12$, 5/17/2015&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 312, Jeans, 50$, 6/9/2015&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Using the above input table, I need to get the below reults&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="border: 0px; font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;TBODY style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD class="xl63" colspan="6" height="20" style="padding-right: 4px; padding-left: 4px; border: 0px solid black; font-style: inherit; font-family: inherit;" width="384"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD class="xl63" height="20" style="padding-right: 4px; padding-left: 4px; border: 0px solid black; font-style: inherit; font-family: inherit;"&gt;Product&lt;/TD&gt;&lt;TD class="xl63" style="padding-right: 4px; padding-left: 4px; border: 0px solid black; font-style: inherit; font-family: inherit;"&gt;ProdName&lt;/TD&gt;&lt;TD class="xl63" style="padding-right: 4px; padding-left: 4px; border: 0px solid black; font-style: inherit; font-family: inherit;"&gt;Price&lt;/TD&gt;&lt;TD class="xl63" style="padding-right: 4px; padding-left: 4px; border: 0px solid black; font-style: inherit; font-family: inherit;"&gt;Updated&lt;/TD&gt;&lt;TD class="xl63" style="padding-right: 4px; padding-left: 4px; border: 0px solid black; font-style: inherit; font-family: inherit;"&gt;From&lt;/TD&gt;&lt;TD class="xl63" style="padding-right: 4px; padding-left: 4px; border: 0px solid black; font-style: inherit; font-family: inherit;"&gt;To Date&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD align="right" class="xl63" height="20" style="padding-right: 4px; padding-left: 4px; border: 0px solid black; font-style: inherit; font-family: inherit;"&gt;123&lt;/TD&gt;&lt;TD class="xl63" style="padding-right: 4px; padding-left: 4px; border: 0px solid black; font-style: inherit; font-family: inherit;"&gt;Watch&lt;/TD&gt;&lt;TD class="xl63" style="padding-right: 4px; padding-left: 4px; border: 0px solid black; font-style: inherit; font-family: inherit;"&gt;150$&lt;/TD&gt;&lt;TD align="right" class="xl64" style="padding-right: 4px; padding-left: 4px; border: 0px solid black; font-style: inherit; font-family: inherit;"&gt;1/1/2015&lt;/TD&gt;&lt;TD align="right" class="xl64" style="padding-right: 4px; padding-left: 4px; border: 0px solid black; font-style: inherit; font-family: inherit;"&gt;1/1/2015&lt;/TD&gt;&lt;TD align="right" class="xl64" style="padding-right: 4px; padding-left: 4px; border: 0px solid black; font-style: inherit; font-family: inherit;"&gt;4/30/2015&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD align="right" class="xl63" height="20" style="padding-right: 4px; padding-left: 4px; border: 0px solid black; font-style: inherit; font-family: inherit;"&gt;123&lt;/TD&gt;&lt;TD class="xl63" style="padding-right: 4px; padding-left: 4px; border: 0px solid black; font-style: inherit; font-family: inherit;"&gt;Watch&lt;/TD&gt;&lt;TD class="xl63" style="padding-right: 4px; padding-left: 4px; border: 0px solid black; font-style: inherit; font-family: inherit;"&gt;125&lt;SPAN class="font5" style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;$&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" class="xl64" style="padding-right: 4px; padding-left: 4px; border: 0px solid black; font-style: inherit; font-family: inherit;"&gt;5/1/2015&lt;/TD&gt;&lt;TD align="right" class="xl64" style="padding-right: 4px; padding-left: 4px; border: 0px solid black; font-style: inherit; font-family: inherit;"&gt;5/1/2015&lt;/TD&gt;&lt;TD class="xl63" style="padding-right: 4px; padding-left: 4px; border: 0px solid black; font-style: inherit; font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5/42015&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD align="right" class="xl63" height="20" style="padding-right: 4px; padding-left: 4px; border: 0px solid black; font-style: inherit; font-family: inherit;"&gt;123&lt;/TD&gt;&lt;TD class="xl63" style="padding-right: 4px; padding-left: 4px; border: 0px solid black; font-style: inherit; font-family: inherit;"&gt;Watch&lt;/TD&gt;&lt;TD class="xl63" style="padding-right: 4px; padding-left: 4px; border: 0px solid black; font-style: inherit; font-family: inherit;"&gt;119$&lt;/TD&gt;&lt;TD align="right" class="xl64" style="padding-right: 4px; padding-left: 4px; border: 0px solid black; font-style: inherit; font-family: inherit;"&gt;5/5/2015&lt;/TD&gt;&lt;TD align="right" class="xl64" style="padding-right: 4px; padding-left: 4px; border: 0px solid black; font-style: inherit; font-family: inherit;"&gt;5/5/2015&lt;/TD&gt;&lt;TD align="right" class="xl64" style="padding-right: 4px; padding-left: 4px; border: 0px solid black; font-style: inherit; font-family: inherit;"&gt;6/18/2015&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Help me implementing the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jun 2015 10:40:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SCD/m-p/850752#M298402</guid>
      <dc:creator />
      <dc:date>2015-06-18T10:40:00Z</dc:date>
    </item>
    <item>
      <title>Re: SCD</title>
      <link>https://community.qlik.com/t5/QlikView/SCD/m-p/850753#M298403</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this script&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Temp:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;Product, ProdName, Price, Date(Updated) AS Updated INLINE&lt;/P&gt;&lt;P&gt;[&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Product, ProdName, Price, Updated&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 123, Watch, 150$, 1/1/2015&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 134, Fruit, 30$, 1/1/2015&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 145, Ring, 3000$, 3/1/2015&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 123, Watch, 125$, 5/1/2015&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 123, Watch, 119$, 5/5/2015&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 134, Fruit , 50$, 5/5/2015&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 145, Ring, 2500$, 5/12/2015&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 234, Pen, 12$, 5/17/2015&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 312, Jeans, 50$, 6/9/2015&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;*,&lt;/P&gt;&lt;P&gt;Updated AS From,&lt;/P&gt;&lt;P&gt;If(Peek(Product) &amp;lt;&amp;gt; Product, Today(), Date(Peek(Updated) - 1)) AS To&lt;/P&gt;&lt;P&gt;RESIDENT Temp&lt;/P&gt;&lt;P&gt;ORDER BY Product, ProdName, Updated Desc;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP TABLE &lt;SPAN style="font-size: 13.3333330154419px;"&gt;Temp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jun 2015 10:51:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SCD/m-p/850753#M298403</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2015-06-18T10:51:39Z</dc:date>
    </item>
    <item>
      <title>Re: SCD</title>
      <link>https://community.qlik.com/t5/QlikView/SCD/m-p/850754#M298404</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14346247256598130 jive_text_macro" jivemacro_uid="_14346247256598130"&gt;
&lt;P&gt;Set DateFormat = 'M/D/YYYY';&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;INPUT:&lt;/P&gt;
&lt;P&gt;LOAD * INLINE&lt;/P&gt;
&lt;P&gt;[&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Product, ProdName, Price, Updated&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 123, Watch, 150$, 1/1/2015&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 134, Fruit, 30$, 1/1/2015&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 145, Ring, 3000$, 3/1/2015&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 123, Watch, 125$, 5/1/2015&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 123, Watch, 119$, 5/5/2015&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 134, Fruit , 50$, 5/5/2015&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 145, Ring, 2500$, 5/12/2015&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 234, Pen, 12$, 5/17/2015&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 312, Jeans, 50$, 6/9/2015&lt;/P&gt;
&lt;P&gt;];&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;RESULT:&lt;/P&gt;
&lt;P&gt;LOAD&amp;nbsp; Product, ProdName, Price, Updated,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Updated as From_Date,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; if(peek(Product) = Product, Date(peek(Updated)-1), Date(today())) as To_Date &lt;/P&gt;
&lt;P&gt;Resident INPUT&lt;/P&gt;
&lt;P&gt;ORDER BY Product, Updated desc;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;DROP TABLE INPUT;&lt;/P&gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jun 2015 10:52:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SCD/m-p/850754#M298404</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-06-18T10:52:18Z</dc:date>
    </item>
    <item>
      <title>Re: SCD</title>
      <link>https://community.qlik.com/t5/QlikView/SCD/m-p/850755#M298405</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Swuehi and Jagan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your kind help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Both of your solution works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But can anyone explain me what exactly is been done in the query above to get the required result, as I can add this to my learning being a new person to QlikView.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jun 2015 11:03:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SCD/m-p/850755#M298405</guid>
      <dc:creator />
      <dc:date>2015-06-18T11:03:22Z</dc:date>
    </item>
    <item>
      <title>Re: SCD</title>
      <link>https://community.qlik.com/t5/QlikView/SCD/m-p/850756#M298406</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The RESULT table is loading the INPUT table in a certain order, first sorted by Product, then by Updated date descending. Now the table comes in with Product 123 first, newest update record first.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The peek() function is looking at the resulting table, so for the first record coming in, there will be no resulting record present, so the comparison will be false and To_Date will be today. Same will happen for any change in Product.&lt;/P&gt;&lt;P&gt;For all other records, QV looks of the Updated value of the resulting record before, you can think of 'one line up'.&lt;/P&gt;&lt;P&gt;Subtracting 1 gives you the To_Date for all these records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's best if you try to 'feed' records in the LOAD script one after the other and try to understand how QV is using peek() to access the records already processed before.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jun 2015 12:38:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SCD/m-p/850756#M298406</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-06-18T12:38:30Z</dc:date>
    </item>
  </channel>
</rss>

