Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
yonghanfi
Contributor II
Contributor II

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
Anil_Babu_Samineni

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;

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful