Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

yonghanfi
New Contributor

How to patching new rows to a table

Hi,

I am loading an exchange rate table for several currencies like A, B, C, D, starting from date 01.01.2016 to today's exchange rate. But not all exchange rates can be found for certain currency. For example, currency B has started the records only 01.04.2016. I want to patch rows to the exchange rate table so for currency B generate rows for date 01.01.2016 to 31.03.2016 and use the exchange value can be found first. e.g. the rate of 01.04.2016. I wonder what is the best way to do it?

Thanks!

1 Reply

Re: How to patching new rows to a table

May be this?

Sample:

Load Currency, Date from Table;

Load Date(YearStart(MinDate) + IterNo() -1) AS Date

While Date(YearStart(MinDate) + IterNo() -1) <= (MaxDate);

Load Min(Date) as MinDate,

Max(Date) as MaxDate

Resident Sample;

Community Browser