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

Comapring old data and updated data and highlight the updates

Hi Friends,

I was trying to do something fancy and got stuck.

I am pulling data from few excel sheets and those sheets get updated from users on daily basis. They may add data or may update the old data or may delete data. So I used to consolidate all the data together into one sheet.

Is there any way by which I can detect the updates which was done by the user today from the data loaded at the time of previous load?

Any help on this will be really appreciated.

Thanks and Regards

Jyothish KC

Best Regards,
KC
7 Replies
Anonymous
Not applicable

Hello,

You need to use a timestamp for that. This is basically DBMS practice, not sure if Excel can achieve.

Check with QlikView Help after getting your timestamp. There is a detailed explanation there. Not sure with Sense Help.

BR

Serhan

jyothish8807
Master II
Master II
Author

Thanks a lot Serhan, let me try this. Getting a timestamp is the issue right now.

Regards

KC

Best Regards,
KC
robert_mika
Master III
Master III

This is maybe a little help but(and you maybe aware) that you can check updates if your Excel workbook it is a shared one going to.

Review-Changes-Track Changes

neha_sri
Creator III
Creator III


Hi Jyothish,

This may be small help but you can go something like load data from excel where date = today().

My main concern is we can use today() function to fetch the records which where inserted or updated today.

Regards

Neha

jyothish8807
Master II
Master II
Author

Thanks for the suggestion Robert, track changes is not what I am looking for. I am trying to implement something in QV. I guess I have to manipulate the script every time when I load

Regards

KC

Best Regards,
KC
jyothish8807
Master II
Master II
Author

Thanks for your suggestion, I guess using today will pull only the recent data but I want to compare the entire data each time when I load with the entire data with its value which was present on the previous load.

Regards

KC

Best Regards,
KC
jagan
Luminary Alumni
Luminary Alumni

Hi Jyothish,

Everytime when you read data from Excel and store it in a QVD and follow below steps

Temp:

LOAD

*

FROM Excel;

Data:

LOAD

*,

'Old' AS DataType

FROM QVDName.QVD (qvd);

STORE Temp INTO QVDName.QVD;

Concatenate(Data)

LOAD

*,

'New' AS DataType

RESIDENT Temp;

DROP TABLE Temp;

Now in the table you have old and new values, you can compare and know the value which is changed by using the flag.

Suppose for Jan-2014 the sales is 1000 in old file, and if it changed to 2000 in new file then you can identify like this

=If(Sum({<DataType = {'Old'}>}Sales)  <> Sum({<DataType = {'New'}>}Sales), 'Changed', 'Not Changed')

Hope this helps you to proceed further.

Regards,

Jagan.