Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Neja
Contributor
Contributor

Combine old data with the new upload

Hello,
 
I have a file with data on a specific date (period). I would like to add a new file each month (twice), adding new data to the app, but keeping the old data so we can see the progress through time.
However, once I upload the new file, the old data is overrun (using the exact name of the file). I am working with an excel file, which will be uploaded monthly (twice) to the share drive.
 
Can someone please help me write the script, so that old data stays in every time I refresh the excel file in the share drive? Would the solution be that my file is named differently (eg. data_03.10.2022, and the following one data 15.10.2022, etc.)?
Thank you in advance!
Labels (3)
3 Replies
micheledenardi
Specialist II
Specialist II

Try with putting an * instead the filename:

LOAD *
FROM [EXCEL LOCATION]*.xlsx
(ooxml, embedded labels, table is [SHEET NAME]);
Michele De Nardi
If a post helps to resolve your issue, please accept it as a Solution.
Alex20
Partner - Contributor II
Partner - Contributor II

Increment issues usually require an inventory file to save, QVD is a good choice, please refer to official best practices if available. Also, try using variables and * to load new data.

Loading new and updated records with incremental load ‒ Qlik Sense on Windows

 

Neja
Contributor
Contributor
Author

Thank you for your reply. I have used the below script and it loaded the new data, however, the old value has disappear.  I can only see the "period" information from previous month, however it is empty. 

 

LOAD
*
FROM [$(path_QVD_Directory)\50_QVD_Transform\Demo_Inventory.qvd]
(qvd);
LET v_CurrMonth = text(Year(today())&num(Month(Today()),'00'));
Trace let v_currMonth = $(v_CurrMonth);


Left Join(temp_Demo_Inventory)
LOAD

"Exchange Rate Type Description",
"Exchange Rate Type",
"From Curr" as Crcy,
"To Curr",
"Exchange Rate Multiplier (0 Decimal Adjusted)"
FROM [lib://20_Master_Data/50_QVD_Transform/ExchangeRate_Monthly.qvd]
(qvd)
Where "Exchange Rate Type" ='ME' and text("Currency Month") = '$(v_CurrMonth)' and "To Curr" = 'USD';
;


NoConcatenate
Demo_Inventory:
Load *,
"Standard Price per Pcs" * "Exchange Rate Multiplier (0 Decimal Adjusted)" as "Standard Price per Pcs USD"
Resident temp_Demo_Inventory;
Drop Table temp_Demo_Inventory;