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

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Variable can't be used in other variables

Hey guys!

I have a problem:

I have 2 states in the app, therefor I process the maximum value of them both dynamically. It is vMaxValue.

I want to create 5 approximately equivalent intervals, that is why I add new variable: vInterval, which is: Floor($(vMaxValue)/5).

It returns a numeric value. And it is shown in the text output box right.

But when I call it in another variable, nothing is returned back.

If I type into vInterval value straight in the variable expression, then it works right.

How can I manage with this issue?

Thanks

Elena

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Putting an = character in front of the expression might help.


talk is cheap, supply exceeds demand

View solution in original post

4 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Putting an = character in front of the expression might help.


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

Thank you Gysbert, I fixed the expression for vInterval with equal sign. It worked!
Could you please explain the reason for that sign?

Elena

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

It makes sure that the variable vInterval gets a numeric value and won't return the entire expression string that then has to be evaluated in another dollar expansion.


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

I got it!
Thank you very much