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

For repeated expression in 'n' of objects how can i write variable at edit script level

Hi friends,

i have a repeated Expression in 'N'  of objects.

How can i write variable at edit script level.

Below is the sample expression

COUNT(Distinct {<Phase={'Live'},Age={'>=0<=30'}>}SOW_CT).

The above expression we are going to using around 6 objects.

I know one method Settings---->Document Properties ---create variable---New etc....,

let me know your suggestion for reuse of expression from Edit script level

InAdvance

Thank you

2 Replies
Nicole-Smith

In the script, you use must use SET or LET to populate a variable:

SET Variable = 'COUNT(Distinct {<Phase={'Live'},Age={'>=0<=30'}>}SOW_CT)';

Then you can use the variable in your charts inside of dollar sign expansion:

$(Variable)

Not applicable
Author

hi Anil,

you can go through this link for more understanding of variable as reusable code

http://community.qlik.com/blogs/qlikviewdesignblog/2013/11/04/the-magic-of-variables