Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Is it possible to reference a variable created in Qlikview?

Hello,

I have been creating a Qlikview dashboard and in the process I have created a variable that makes use of a data array that is uploaded. I now wish to reference that data for further calculations, instead of always referring back to the original data array and performing the same calculations on it again. For example:

Variable = x*[Data Array]+y^2

I want to use this variable in future calculations:

Newvariable= a*variable+b^3

Instead, I always have to do the following:

Newvariable = a*(x*[Data Array]+y^2)+b^3

Any hints on how to make the code more efficient in this manner?

1 Solution

Accepted Solutions
pover
Partner - Master
Partner - Master

Try using dollar-sign expansion like the following example:

Newvariable= a*$(variable)+b^3

The variable will be copied to the Newvariable before the Newvariable is calculated.

Regards.

View solution in original post

3 Replies
pover
Partner - Master
Partner - Master

Try using dollar-sign expansion like the following example:

Newvariable= a*$(variable)+b^3

The variable will be copied to the Newvariable before the Newvariable is calculated.

Regards.

Not applicable
Author

I tried your suggestion, but I just get a blank Object. Here is my formula:

='Loss relative to mean='&

round(avg([Daily Rtn])-$(VaR),0.01)

Where



VaR = &

round(min([Daily Rtn],round(count([Daily Rtn])*(1-ConfidenceLevel))),.01)



Not applicable
Author

I figured it out. Forgot to remove the & symbol. Thanks.