Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
is there a possiblity in QlikView storing values out of a straight table once a week?
SAP does not deliver historical values about this - therefore we loose the possibility showing a development of the figures..
These values per category should be saved..
Thank you a lot for your ideas!
Regards
Barbara
Hi Paul,
it does look great =), what does Barbara say?
thanks a lot
beck
Hi Barbara,
kein Problem 😃
if you find your solution, please let me know
Hi Paul!
sorry for that question 🙂 but where do I have to put in this script-part? Into the main script or do I have to set up a new variable or is it a Trigger I have to create within the properties of the tab?
Thanks for your patience 🙂
regards,
Barbara
This is a (peace of) macro, not a script part.
You could create post reload trigger to run a macro (like stalwar1) suggested. However i'm not sure if a post reload trigger works when using a QV Server reload.
I would advice you to (if possible) store the data from script into a QVD.
Hi Paul,
so finally my VB-Trials got results 🙂
I actually used another script which was easier for me to understand (I am not sure which differences are there compared to the previous script from you and Beck):
''---------------------------------------------------------
sub ExpQVD
''---------------------------------------------------------
set v = ActiveDocument.Variables("vTempFolder")
set v1 = v.GetContent
tempFolder = v1.String
set v = ActiveDocument.Variables("vQVDName")
set v1 = v.GetContent
QVDName = v1.String
QVDFile = tempFolder & "\" & QVDName & ".qvd"
set obj = ActiveDocument.GetSheetObject("CH37")
obj.ExportEx QVDFile, 4
End Sub
I do get a qvd with the data - but actually like to have a timestamp in this QVD. Do you have any further tipps how to get a new column with the timestamp?
because now I think that the QVD is overwritten each day?
Thanks,
Barbara
Maybe you can add a date field to the underlying data of your straight table and store this historical data in a qvd adding a snapshot once a week.
You can use the new date field to select the snapshot (week) you want.
Hi maxgro,
I added a timestamp field in the table (qvw object). But I still have the problem, that the data is overwritten with each reload..
regards
Barbara
Change QVDName into a variable with contains a timestamp format of the ReloadTime
='SAPHistory'&'_'&TIMESTAMP(ReloadTime(), 'YYYYMMDD_HHmm')&'.qvd'
Gives someting like: SAPHistory_20160721_0812.qvd
Now you get a new QVD name for every reload.
regards
Paul
Hi Paul!
thanks - this might be a solution . But is it though possible loading each day the values into one qvd? because when I need this data it's getting very compley with a qvd file for each day...
thanks,
Barbara
you can load many qvd in one statement
load ...
from SAPHistory_????????.qvd
where ? is 1 char (20160720 20160721 ...)