Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
mostal75
Contributor III
Contributor III

Script variable

Hello,

I have a variable X1 like

=sum({"MyBookmark")Amount)

created manually into my app

I would like to retrieve into my script X1 value to store in QVD.


Do you have any idea because I have errors or definition (no evaluated variable) with

   LOAD $(X1) as Amount1 autogenerate 1;

or

LOAD '$(X1)' as Amount1 autogenerate 1;

Regards

2 Replies
swuehl
MVP
MVP

You can't use set analysis in the script.

You would need the 'traditional' way to get your sum, i.e. using a LOAD from a data source with the field Amount and WHERE clause to filter the records.

Maybe you can create a variable to retrieve the field selections in state MyBookmark after a reload and parse this variable in the next reload to get your aggregated filtered Amount and store to a QVD.

Maybe it's easier to do all this in the UI.

mostal75
Contributor III
Contributor III
Author

Thank you very much Stefan

I've tried with a variable defined like that  vINF=sum({"MyBookmark")Amount)

In charts, $(vINF) works fine but not in script (formula retrieve, not variable value), with

LOAD '$(vINF)' as Amount1 autogenerate 1;

or

LOAD $(vINF) as Amount1 autogenerate 1;


Do you have any idea please ?


Regards