Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Weekly SNAPSHOT of STRAIGHT Table

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..

20-07-2016 10-27-17.jpg

Thank you a lot for your ideas!

Regards

Barbara

22 Replies
beck_bakytbek
Master
Master

Hi Paul,

it does look great =), what does Barbara say?

thanks a lot

beck

beck_bakytbek
Master
Master

Hi Barbara,

kein Problem 😃

if you find your solution, please let me know

Not applicable
Author

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

p_verkooijen
Partner - Specialist II
Partner - Specialist II

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.

Not applicable
Author

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

maxgro
MVP
MVP

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.

Not applicable
Author

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

p_verkooijen
Partner - Specialist II
Partner - Specialist II

Hi barbaramayrleitner,

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

Not applicable
Author

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

maxgro
MVP
MVP

you can load many qvd in one statement

load      ...

from    SAPHistory_????????.qvd

where ? is 1 char  (20160720  20160721 ...)