<?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: Store data as history in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Store-data-as-history/m-p/402818#M149866</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are using two different files:&lt;/P&gt;&lt;P&gt;&lt;CODE class="jive-code"&gt;C:\Arbete\Qlikview\Project\New folder\test.qvd;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE class="jive-code"&gt;C:\Test\Qlikview\Project\New folder\test.QVD&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe that's the reason you don't see the today and yesterday.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 11 Oct 2012 08:59:32 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-10-11T08:59:32Z</dc:date>
    <item>
      <title>Store data as history</title>
      <link>https://community.qlik.com/t5/QlikView/Store-data-as-history/m-p/402815#M149863</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;I am quite new to Qlikview but I must say, it is a great tool and easy to learn.&lt;/P&gt;&lt;P&gt;However, my first application is close to release but I have one last function that I need to get working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; My application read some values from a .qvd. Some of those field I would like to store on daily bacis.&lt;/P&gt;&lt;P&gt;And in my application the user will be able to select different dates and get the values from that selected year/month/day.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My store function works fine, I guess. But the problem is that I keep overwriting my data everytime, which is quite obvious when you see my code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;PRE&gt;&lt;/PRE&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_1349938631766435" jivemacro_uid="_1349938631766435"&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13499386456195877" jivemacro_uid="_13499386456195877"&gt;&lt;P&gt;SaveHistory:&lt;BR /&gt;load value1,&lt;BR /&gt;value2,&lt;BR /&gt;Today() as vDate,&lt;BR /&gt;Year(Today()) as vYear,&lt;BR /&gt;Month(Today()) as vMonth,&lt;BR /&gt;Week(Today()) as vWeek,&lt;BR /&gt;Day(Today()) as vDay,&lt;/P&gt;&lt;P&gt;Resident MyDataSourceTable;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;store SaveHistory into C:\Test\Qlikview\Project\New folder\test.qvd; // (qvd)&lt;/P&gt;&lt;P&gt;drop table SaveHistory;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;BR /&gt; //Load history to use in graphs etc.&lt;BR /&gt;History:&lt;BR /&gt;Load value1,&lt;BR /&gt;value2,&lt;BR /&gt;vYear,&lt;BR /&gt;vMonth,&lt;BR /&gt;vWeek,&lt;BR /&gt;vDay,&lt;BR /&gt;vMinute&lt;BR /&gt;//vDate2&lt;BR /&gt;From C:\Test\Qlikview\Project\New folder\test.QVD (qvd);&lt;/P&gt;&lt;/PRE&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do I update my history with the new value? Ex. 2012-12-24 value1 as "christmas" and 2012-12-25 value1 as "hangover"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Oct 2012 07:04:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Store-data-as-history/m-p/402815#M149863</guid>
      <dc:creator />
      <dc:date>2012-10-11T07:04:27Z</dc:date>
    </item>
    <item>
      <title>Re: Store data as history</title>
      <link>https://community.qlik.com/t5/QlikView/Store-data-as-history/m-p/402816#M149864</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;He Jesper,&lt;/P&gt;&lt;P&gt;If I understand your problem correctly you are trying to add new data to a qvd file?&lt;/P&gt;&lt;P&gt;And then save that new file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can add data by using the concetenate load function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For eg&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;History:&lt;/P&gt;&lt;P&gt;Load *&lt;/P&gt;&lt;P&gt;from &lt;/P&gt;&lt;P&gt;&lt;CODE class="jive-code"&gt;C:\Test\Qlikview\Project\New folder\test.qvd;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;concetenate load &lt;/P&gt;&lt;P&gt;&lt;CODE class="jive-code"&gt;value1,&lt;BR /&gt;value2,&lt;BR /&gt;Today() as vDate,&lt;BR /&gt;Year(Today()) as vYear,&lt;BR /&gt;Month(Today()) as vMonth,&lt;BR /&gt;Week(Today()) as vWeek,&lt;BR /&gt;Day(Today()) as vDay,&lt;BR /&gt;Resident MyDataSourceTable;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's best practice to write variables as vDate,vYear,vMonth etc. Right now you are using the naming of variables for fields, which might be confusing for someone else seeing your code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;gr.&lt;/P&gt;&lt;P&gt;Frank&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Oct 2012 07:21:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Store-data-as-history/m-p/402816#M149864</guid>
      <dc:creator />
      <dc:date>2012-10-11T07:21:43Z</dc:date>
    </item>
    <item>
      <title>Re: Store data as history</title>
      <link>https://community.qlik.com/t5/QlikView/Store-data-as-history/m-p/402817#M149865</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Frank! I'm slowly getting there!&lt;/P&gt;&lt;P&gt;However I seem to write over the previous data when I store the field values?&lt;/P&gt;&lt;P&gt;I want the new qvd to contain data from today - linked to that specific date. And all field values from yesterday, linked to 2012-10-10.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13499434336567606" jivemacro_uid="_13499434336567606"&gt;&lt;P&gt;SaveHistory:&lt;BR /&gt;Load *&lt;BR /&gt;from&lt;BR /&gt;C:\Test\Qlikview\Project\New folder\test.qvd;&lt;/P&gt;&lt;P&gt;Concatenate load&lt;BR /&gt;values1,&lt;/P&gt;&lt;P&gt;values2,&lt;/P&gt;&lt;P&gt;Today() as vDate,&lt;BR /&gt;//'2012-10-10' as vDate,&lt;BR /&gt;Year(Today()) as vYear,&lt;BR /&gt;Month(Today()) as vMonth,&lt;BR /&gt;Week(Today()) as vWeek,&lt;BR /&gt;Day(Today()) as vDay&lt;/P&gt;&lt;P&gt;Resident Load1;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;store SaveHistory into C:\Arbete\Qlikview\Project\New folder\test.qvd; // (qvd)&lt;/P&gt;&lt;P&gt;drop table SaveHistory;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Loading&lt;BR /&gt;History:&lt;BR /&gt;Load values1 as something1,&lt;/P&gt;&lt;P&gt;values2 as something2,&lt;/P&gt;&lt;P&gt;vDate,&lt;BR /&gt;vYear,&lt;BR /&gt;vMonth,&lt;BR /&gt;vWeek,&lt;BR /&gt;vDay&lt;BR /&gt;From C:\Test\Qlikview\Project\New folder\test.QVD (qvd);&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if I try manually put in another date (you might see that comment with yesterdays date), when I then compile todays date will disappear from the field vDate?&lt;/P&gt;&lt;P&gt;I believe that vDate should contain both 2012-10-11 and 2012-10-10 by now, but it doesn't.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your time!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Oct 2012 08:10:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Store-data-as-history/m-p/402817#M149865</guid>
      <dc:creator />
      <dc:date>2012-10-11T08:10:02Z</dc:date>
    </item>
    <item>
      <title>Re: Store data as history</title>
      <link>https://community.qlik.com/t5/QlikView/Store-data-as-history/m-p/402818#M149866</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are using two different files:&lt;/P&gt;&lt;P&gt;&lt;CODE class="jive-code"&gt;C:\Arbete\Qlikview\Project\New folder\test.qvd;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE class="jive-code"&gt;C:\Test\Qlikview\Project\New folder\test.QVD&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe that's the reason you don't see the today and yesterday.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Oct 2012 08:59:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Store-data-as-history/m-p/402818#M149866</guid>
      <dc:creator />
      <dc:date>2012-10-11T08:59:32Z</dc:date>
    </item>
    <item>
      <title>Re: Store data as history</title>
      <link>https://community.qlik.com/t5/QlikView/Store-data-as-history/m-p/402819#M149867</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oh sorry for the confusion, but&amp;nbsp; that is not the problem. I forgot to change that when I pasted the code... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will try to explain my self better:&lt;/P&gt;&lt;P&gt;Every day, the fields will be stored in the qvd - sorted under the specific date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* 2012-10-10, values1 might contain 123123 and 5125412.&lt;/P&gt;&lt;P&gt;* 2012-10-11, values1 will contain 246561 and 251145.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my application, the user should be able to choose between dates and get the values from that specific day.&lt;/P&gt;&lt;P&gt;Hope that clarify some &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Oct 2012 09:10:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Store-data-as-history/m-p/402819#M149867</guid>
      <dc:creator />
      <dc:date>2012-10-11T09:10:12Z</dc:date>
    </item>
    <item>
      <title>Re: Store data as history</title>
      <link>https://community.qlik.com/t5/QlikView/Store-data-as-history/m-p/402820#M149868</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Jesper,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Concatenate load should do the trick here. So probably something else is going wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try making it as simple as possible. For eg you don't need to save &lt;CODE class="jive-code"&gt;vYear,&lt;BR /&gt;vMonth,vWeek andvDay. &lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;Saving vDate should be enough,vYear,vMonth,vWeek,vDay can be derived from vDate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your data should like this:&lt;/P&gt;&lt;P&gt;Historical:&lt;/P&gt;&lt;P&gt;vDate&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Value1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Value2&lt;/P&gt;&lt;P&gt;2012-10-10&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 123123&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 456&lt;/P&gt;&lt;P&gt;2012-10-10&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;5125412&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 457&lt;/P&gt;&lt;P&gt;New data:&lt;/P&gt;&lt;P&gt;vDate&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Value1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Value2&lt;/P&gt;&lt;P&gt;2012-10-11&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;246561 &lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 460 &lt;/P&gt;&lt;P&gt;2012-10-11&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;251145&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 461&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So concatenating the new data to Historical should work.&lt;/P&gt;&lt;P&gt;Could you look in the table viewer (ctr-t) and check how the table &lt;CODE class="jive-code"&gt;History&lt;/CODE&gt; looks when loaded?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Oct 2012 09:48:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Store-data-as-history/m-p/402820#M149868</guid>
      <dc:creator />
      <dc:date>2012-10-11T09:48:13Z</dc:date>
    </item>
    <item>
      <title>Re: Store data as history</title>
      <link>https://community.qlik.com/t5/QlikView/Store-data-as-history/m-p/402821#M149869</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I found the problem. I had forgotten the (qvd) reference in&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE class="jive-code"&gt;SaveHistory:&lt;BR /&gt;Load *&lt;BR /&gt;from&lt;BR /&gt;C:\Test\Qlikview\Project\New folder\test.qvd;&lt;BR /&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;C:\Test\Qlikview\Project\New folder\test.qvd (qvd); solved the issue&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your first answer was the solution, thanks again Frank!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Oct 2012 10:45:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Store-data-as-history/m-p/402821#M149869</guid>
      <dc:creator />
      <dc:date>2012-10-11T10:45:34Z</dc:date>
    </item>
  </channel>
</rss>

