<?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 Exchange rate per date : filling missing data + fill in dates in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Exchange-rate-per-date-filling-missing-data-fill-in-dates/m-p/1637940#M731969</link>
    <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My question today is this one :&lt;/P&gt;&lt;P&gt;I have a table representing currencies per date BUT the file is not completely filled in.&lt;/P&gt;&lt;P&gt;For example all Saturdays and Sundays and bank holidays my currencies are 0 and it's only filled in until the last Friday of the week before.&lt;/P&gt;&lt;P&gt;My file looks like this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Date_currency&lt;/TD&gt;&lt;TD&gt;Currency&lt;/TD&gt;&lt;TD&gt;Value&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;01/01/2015&lt;/TD&gt;&lt;TD&gt;USD&lt;/TD&gt;&lt;TD&gt;-&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;02/01/2015&lt;/TD&gt;&lt;TD&gt;USD&lt;/TD&gt;&lt;TD&gt;1.2043&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;03/01/2015&lt;/TD&gt;&lt;TD&gt;USD&lt;/TD&gt;&lt;TD&gt;-&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;04/01/2015&lt;/TD&gt;&lt;TD&gt;USD&lt;/TD&gt;&lt;TD&gt;-&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;18/10/2019&lt;/TD&gt;&lt;TD&gt;USD&lt;/TD&gt;&lt;TD&gt;1.1144&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I would like to do is to fill in missing currency value with the value of the day before (for example on Saturday we put Friday value, on Sunday we put Saturday value which is also Friday value)&lt;/P&gt;&lt;P&gt;My data starts on 01/01/2015 and unfortunately all currencies value are 0 on this day in my file but I need to put the first value that is read for this currency.&lt;/P&gt;&lt;P&gt;You will see as an example for USD 01/01/2015 Value is empty but 02/01/2015 Value = 1.2043&lt;/P&gt;&lt;P&gt;I need to change 01/01/2015 Value to 1.2043&lt;/P&gt;&lt;P&gt;The same way : 03/01/2015 is saturday my value is 0 I need to put the value from the day before&lt;/P&gt;&lt;P&gt;Same thing for Sunday&lt;/P&gt;&lt;P&gt;And same thing for all weeks all currencies..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As you will see the data stops on Friday 18/10/2019, I would also need to generate 19 20 21 (today) dates for all currencies with the value of last Friday.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Quite complex right ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please have a look at my file and you will directly understand the issue I'm facing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot for your contributions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 19:50:58 GMT</pubDate>
    <dc:creator>Hakim-A</dc:creator>
    <dc:date>2024-11-16T19:50:58Z</dc:date>
    <item>
      <title>Exchange rate per date : filling missing data + fill in dates</title>
      <link>https://community.qlik.com/t5/QlikView/Exchange-rate-per-date-filling-missing-data-fill-in-dates/m-p/1637940#M731969</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My question today is this one :&lt;/P&gt;&lt;P&gt;I have a table representing currencies per date BUT the file is not completely filled in.&lt;/P&gt;&lt;P&gt;For example all Saturdays and Sundays and bank holidays my currencies are 0 and it's only filled in until the last Friday of the week before.&lt;/P&gt;&lt;P&gt;My file looks like this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Date_currency&lt;/TD&gt;&lt;TD&gt;Currency&lt;/TD&gt;&lt;TD&gt;Value&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;01/01/2015&lt;/TD&gt;&lt;TD&gt;USD&lt;/TD&gt;&lt;TD&gt;-&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;02/01/2015&lt;/TD&gt;&lt;TD&gt;USD&lt;/TD&gt;&lt;TD&gt;1.2043&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;03/01/2015&lt;/TD&gt;&lt;TD&gt;USD&lt;/TD&gt;&lt;TD&gt;-&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;04/01/2015&lt;/TD&gt;&lt;TD&gt;USD&lt;/TD&gt;&lt;TD&gt;-&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;18/10/2019&lt;/TD&gt;&lt;TD&gt;USD&lt;/TD&gt;&lt;TD&gt;1.1144&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I would like to do is to fill in missing currency value with the value of the day before (for example on Saturday we put Friday value, on Sunday we put Saturday value which is also Friday value)&lt;/P&gt;&lt;P&gt;My data starts on 01/01/2015 and unfortunately all currencies value are 0 on this day in my file but I need to put the first value that is read for this currency.&lt;/P&gt;&lt;P&gt;You will see as an example for USD 01/01/2015 Value is empty but 02/01/2015 Value = 1.2043&lt;/P&gt;&lt;P&gt;I need to change 01/01/2015 Value to 1.2043&lt;/P&gt;&lt;P&gt;The same way : 03/01/2015 is saturday my value is 0 I need to put the value from the day before&lt;/P&gt;&lt;P&gt;Same thing for Sunday&lt;/P&gt;&lt;P&gt;And same thing for all weeks all currencies..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As you will see the data stops on Friday 18/10/2019, I would also need to generate 19 20 21 (today) dates for all currencies with the value of last Friday.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Quite complex right ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please have a look at my file and you will directly understand the issue I'm facing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot for your contributions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 19:50:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Exchange-rate-per-date-filling-missing-data-fill-in-dates/m-p/1637940#M731969</guid>
      <dc:creator>Hakim-A</dc:creator>
      <dc:date>2024-11-16T19:50:58Z</dc:date>
    </item>
    <item>
      <title>Re: Exchange rate per date : filling missing data + fill in dates</title>
      <link>https://community.qlik.com/t5/QlikView/Exchange-rate-per-date-filling-missing-data-fill-in-dates/m-p/1637983#M731970</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Table:
LOAD Date(Date#(Date_currency, 'DD/MM/YYYY')) as Date_currency,
	 currency,
     Num(Value, '#,##0.00', '.', ',') as Value
FROM
[..\..\Downloads\currencies.xlsx]
(ooxml, embedded labels, table is Sheet1);

tmpTable:
LOAD currency,
	 FirstSortedValue(Value, Date_currency) as Starting_value
Resident Table
Where Len(Trim(Value)) &amp;gt; 0
Group By currency;

Left Join (tmpTable)
LOAD Date(Min + IterNo() - 1) as Date_currency
While Min + IterNo() - 1 &amp;lt;= Today();
LOAD Min(Date_currency) as Min,
	 Max(Date_currency) as Max
Resident Table;

Left Join (tmpTable)
LOAD *
Resident Table;

DROP Table Table;

FinalTable:
LOAD currency,
	 Date_currency,
	 If(currency &amp;lt;&amp;gt; Previous(currency),
	 	If(Len(Trim(Value)) = 0, Starting_value, Value),
	 	If(Len(Trim(Value)) = 0, Peek('Value'), Value)
	 ) as Value
Resident tmpTable
Order By currency, Date_currency;

DROP Table tmpTable;&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 21 Oct 2019 17:35:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Exchange-rate-per-date-filling-missing-data-fill-in-dates/m-p/1637983#M731970</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-10-21T17:35:56Z</dc:date>
    </item>
    <item>
      <title>Re: Exchange rate per date : filling missing data + fill in dates</title>
      <link>https://community.qlik.com/t5/QlikView/Exchange-rate-per-date-filling-missing-data-fill-in-dates/m-p/1638179#M731971</link>
      <description>&lt;P&gt;Thanks for your reactivity - Your solution is working perfectly&lt;/P&gt;</description>
      <pubDate>Tue, 22 Oct 2019 07:54:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Exchange-rate-per-date-filling-missing-data-fill-in-dates/m-p/1638179#M731971</guid>
      <dc:creator>Hakim-A</dc:creator>
      <dc:date>2019-10-22T07:54:32Z</dc:date>
    </item>
  </channel>
</rss>

