Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Data-comparision

Hi dear Community,

i have a comparison-data-load-problem. I must load monthly project-data in form of excel-files.Therefor i must compare the field "actual cost" with each file. so for example i have the month July and June. In June the actual cost was about 1000 $ and in July about 1500$ dollar. So when i add loading the new monthly excel-file for July, then the programm should replace the old fieldvalue of actual cost(from June) which was about 1000$ and should set an new fieldvalue with the new value of 1500$.

Can i anybody help me please by solving my problem?

1 Solution

Accepted Solutions
Not applicable
Author

Hi Dilan ,

It will work with your excel files too. Just need to do some coding .

If you can share sample data , i can work on sample code for your reference.

Regards,

Bhushan N

View solution in original post

25 Replies
Not applicable
Author

Hi ,

If I get you correct you are basically looking for insert + update function during loading .

You can check HELP to know more about it .

I pasted sample code below for your quick reference.

Insert and Update. (No Delete)

Script example:

QV_Table:

SQL SELECT PrimaryKey, X, Y FROM DB_TABLE

WHERE ModificationTime >= #$(LastExecTime)#;

Concatenate LOAD PrimaryKey, X, Y FROM File.QVD

WHERE NOT Exists(PrimaryKey);

STORE QV_Table INTO File.QVD;

Regards,

Bhushan N

Not applicable
Author

Hi Bhushan,

first i want to thank you very much for answering and helping me. There is a little problem that i have by understanding your code cause my datas are only in form of excel and not like a database. so is it possible to match this code for using excel files. see, i have one excel file in june and then i want to update the existent data with the data files from july. so i have a monthly update and replace when i have different values for the actual cost field. i hope you can understand me:)))

best regards

dilan(but not like dylan) so i ´m a girl and not a boy;)

Not applicable
Author

Hi Dilan ,

It will work with your excel files too. Just need to do some coding .

If you can share sample data , i can work on sample code for your reference.

Regards,

Bhushan N

Not applicable
Author

Hello Again,

i would send you two excel_files if you want to give me your email adress, cause i try to paste a view of document here, but it is not really coherent:)

malhaar
Partner - Contributor II
Partner - Contributor II

Another possible way to look at this problem:

Store the field as a Year-to-Date (YTD) value. At the time of presentation, use Set Analysis to subtract current month's YTD value with previous month's YTD value and arrive at the current month's actual value.

Not applicable
Author

HI
Not applicable
Author

Hi ,

you can forward me your sample files to bnirgude @ gmail . com

I will work on them & send you QVW through this forum thread .

Cheers,

Bhushan N

Not applicable
Author

Hi bnirgude,

ok i will send you the files on your email. Thank you a lot for helping me!!!

Cheers,

Dilan

Not applicable
Author

Hi Dilan ,

Please find the attached application and i hope this will help you to understand how to implement .

I am sending you complete folder . I placed arbitatory "project_id".

Let me know if you have any doubts on the same .

Cheers,

Bhushan N