Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Store variables in QVD to access from QVW

Hi there,

I am seeking for a help in a current problem. I have data base with summaries tables. I can not join them all because of inflated totals and would like to create variables for later access from level above qvw. So is it possible to store variables in qvd to access them from another qvw ? Or u can advice something better for this instance. Thanks.

17 Replies
Not applicable
Author

You can only save tables in a QVD, but you could use that variable adding it to a table..

It depends on the information it contains. Which information contains that variable?

Not applicable
Author

X =  if(a>b, sum(field_A)/sum(field_B) )

I can do this aggregation in SQL but it would be great to know if there is a way to calculate and store the value in a qvd in form of variable or in table as variable. And how to access this value from qvw later on.Thanks.   

Colin-Albert

You could save the definition of your variable to a text file, and then use an INCLUDE statement to load the same variable definition into another QVW in the load script.


Not applicable
Author

Why not just copy & paste in a variable of that QVW?

Janis:

I don't understand the use of that variable. You should use it in the QVW (CTRL + ALT + V  to create a variable).

Or create a new table with field A, field B and that expression in the variable as the 3rd field. (Or you could just add it to the table that has field A and field B if they are in the same table of course).

Not applicable
Author

The reason is every variable has been calculated for at least 1 min (about 100 000 000 records). I have about 10 variables. My intention is to do the calculation in background once a day storing these results in qvd and access them by qvw with no extra time spent for calculation.

Not applicable
Author

Then add it as a field in the table that has field A and field B or create a new one with these fields.

ToniKautto
Employee
Employee

You can easily store variables to QVD and restore them back into the same or a different application. The prerequisite for this to work is using a Project (PRJ) folder.

Have a look at my sample script for a possible solution, How to store and recover variables

Not applicable
Author

I am unable to try it now but will let you know how it works in my case.Thanks.