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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
ckoltam
Contributor III
Contributor III

Error in expression

Good morning,

Can someone explain to me why this expression is not working? I have a 2020 QlikSense version

I created a variable with the expression:

ONLY({<LAB_DESCRIPTION = {'$(=V_PRIMER_LABORATORIO)'}>} $(=DIMENSIONS_LEVEL_FIELD))

 

If I replace $(=DIMENSIONS_LEVEL_FIELD) with just DIMENSIONS_LEVEL_FIELD, the expression works, but the original version is what I need.

 

Thank you all.

Labels (3)
2 Replies
AlexWest
Creator
Creator

Hi!

Try with double quotes:

ONLY({<LAB_DESCRIPTION = {"$(=V_PRIMER_LABORATORIO)"}>} $(=DIMENSIONS_LEVEL_FIELD))

vinieme12
Champion III
Champion III

the variable must return the field name as a string

example

DIMENSIONS_LEVEL_FIELD   =   if(SomeCondition, 'FieldA', 'FieldB')

then in expression use $(DIMENSIONS_LEVEL_FIELD)

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.