Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
bnelson111
Creator
Creator

Save a calculation as a data record.

This is a interesting one. I have production plan that is live with no audit or historical data logging. When i run the qlikview presentation and sum the currently value for the work load its a capture at that point in time.

Is there a way to record stamp this as per that data and save it as a record so that if i wish to review the last few weeks i would have the daily sums?

Remember the data base always changes.

Thanks Brett

1 Solution

Accepted Solutions
Anonymous
Not applicable

You must do that in script, set analysis are only allowed in frontend.

If  PSADATA.quantity and PSADATA.processtype are within one table,

you could do somethink like that in script:

STORETABLE:

noconcatenate

LOAD

sum(PSADATA.quantity) as SUMPSADATA.quantity

Resident YOURTABLE

WHERE wildmatch(PSADATA.processtype,'*prt*')

group by YOUR.GROUPING.DIMENSION

;


store STORETABLE into STORE.qvd (qvd);


drop table STORETABLE;

View solution in original post

5 Replies
micheledenardi
Specialist II
Specialist II

You have to create daily QVDs and then load it into your presentation.

Michele De Nardi
If a post helps to resolve your issue, please accept it as a Solution.
bnelson111
Creator
Creator
Author

Without sounding silly whats the easiest way over achieving that automatically and dating it.

Nicole-Smith

You could add a timestamp of current day onto the name of the qvd that you are storing:

LET vToday = date(today(), 'YYYYMMDD');

STORE * FROM Table INTO QVD_Name_$(vToday).qvd (qvd);

This will create a new QVD everyday that your data loads.  If you have more than one table in your data model, you will need more than one STORE statement.

bnelson111
Creator
Creator
Author

Thanks, could i store the expression result only and save sum below under DD/MM/YYYY which it relates to ?

For example :

num(sum({<PSADATA.processtype={"*prt*"}>} PSADATA.quantity)  ,'#,##0')

Anonymous
Not applicable

You must do that in script, set analysis are only allowed in frontend.

If  PSADATA.quantity and PSADATA.processtype are within one table,

you could do somethink like that in script:

STORETABLE:

noconcatenate

LOAD

sum(PSADATA.quantity) as SUMPSADATA.quantity

Resident YOURTABLE

WHERE wildmatch(PSADATA.processtype,'*prt*')

group by YOUR.GROUPING.DIMENSION

;


store STORETABLE into STORE.qvd (qvd);


drop table STORETABLE;