Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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
Thanks a lot Serhan, let me try this. Getting a timestamp is the issue right now.
Regards
KC
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
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
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
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
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.