Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikWorld, June 24-25, 2020. Free virtual event for DI and DA gurus. Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted
Partner
Partner

Re: Comapring old data and updated data and highlight the updates

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

Highlighted
Master II
Master II

Re: Comapring old data and updated data and highlight the updates

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

Regards

KC

Best Regards,
KC
Highlighted

Re: Comapring old data and updated data and highlight the updates

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

Highlighted
Creator III
Creator III

Re: Comapring old data and updated data and highlight the updates


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

Highlighted
Master II
Master II

Re: Comapring old data and updated data and highlight the updates

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
Highlighted
Master II
Master II

Re: Comapring old data and updated data and highlight the updates

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
MVP & Luminary
MVP & Luminary

Re: Comapring old data and updated data and highlight the updates

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.