Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
sculptorlv
Creator III
Creator III

How to use SET - simply

Can't get with simple thing. Please help.

I defined one variable

SET Price_Criteria = '2.84';

Now I opened Text Object ... and use following value:

=$(Price_Criteria)  

     and I get no values....

How can I use my simple variable?

1 Solution

Accepted Solutions
reddy-s
Master II
Master II

Hi Ruslans,

Just use this as your expression : =$(Price_Criteria) .... this will work

View solution in original post

11 Replies
sunny_talwar

What do you get when you just do =Price_Criteria in the text box?

JonnyPoole
Employee
Employee

Either way worked for me ??  Maybe save, close , reopen qlik sense desktop? (if server, close browser)

Capture.PNGCapture2.PNG

sculptorlv
Creator III
Creator III
Author

uh... for me this not working..

may be it is about qlickview vesion - I have version 10.

1_Set.jpg

2_Result.jpg

sculptorlv
Creator III
Creator III
Author

I get the wrong variable and no result

3_Result.jpg

sunny_talwar

If you are seeing this, my guess is that your variable is not getting created. Can you check and confirm that you are able to see your variable in the variable overview (ALT + CTRL + V)

reddy-s
Master II
Master II

Hi Ruslans,

Just use this as your expression : =$(Price_Criteria) .... this will work

jonathandienst
Partner - Champion III
Partner - Champion III

Works for me, although you don't need the $ expansion, putting

=Price_Criteria


or

=$(Price_Criteria)

should work just as well.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
sculptorlv
Creator III
Creator III
Author

Thanks. This really works. I used to use exactly this syntax  - but there was problem and I found it out.

At the very beginning I used SET variables ant the start of my SQL text. Then  I copied (cut) them to the end of SQL text and add another SET variables.

The old ones worked, but new ones DON'N. Thus I copied ALL SET variables at the beginning of my SQL. Now everything works fine.

sculptorlv
Creator III
Creator III
Author

Uh.. this syntax.. what I do wrong now???? Please help

This simple formula..

2.jpg

And it doesn't work in expression:

1.jpg