Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
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.