Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to change the UI variable to Script variable?

Hi Folks,

I have variable called vCrAmt, it is declared in UI side i.e., Settings>Variable Overview.

Now i am trying to call the same variable from Edit Script.

SET vCrAmt=SUM({$<[Trxn. Date]={"$(=DATE(MAX[Trxn. Date]))"}>}CrAmt);

Can anyone help me to put the same in Edit Script....

I tried like this...

SET vCrAmt='SUM({$<[Trxn. Date]={"$(=DATE(MAX[Trxn. Date]))"}>}CrAmt)';

getting no value..

Thanks in advance...

5 Replies
sushil353
Master II
Master II

Try this:

SET vCrAmt= '=SUM({$<[Trxn. Date]={"$(=DATE(MAX[Trxn. Date]))"}>}CrAmt)';

Not applicable
Author

i will try and let u know

Thanks for the reply Sushil Kumar

Not applicable
Author

Hi Sushil,

I am trying like this, its not working..

SET vCrAmt='=Sum({$<[Trxn. Date]={"$(=DATE(MAX([Trxn. Date])))"}>}[CrAmt])';

sushil353
Master II
Master II

this must work..

how are you using this variable in your expression..? have u checked the same expression in text box?

Not applicable
Author

Yes Sushil,

Its showing this

'=Sum({$<[Trxn. Date]={"$(=DATE(MAX([Trxn. Date])))"}>}[CrAmt])' --> Text Object Expr