Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Variable concatenated with $ not evaluating

I have created a table that includes metric names and metric variables (set as formulas) for two groups. In an expression in a straight table, the variable (which includes parentheses) is returned and I am concatenating it with a dollar sign. My hope was that this would force dollar sign expansion of the variable, but it isn't evaluating. Can anyone give me some advice on how to make this happen.

See qwv attached.  First Expression is the field from the table that contains the variables (see Inline Load in CALCs tab in load script). Second Expression is the field (variable) concatenated with a dollar sign at the front. The Fourth Expression is what the result should be for Group 1.

Thanks in advance!

1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

You can't force evaluation that way. Would be nice, but as you found you get just a string with a $ in it.

The way I've approached this problem is with a pick(match()) expression.

=pick(

     match(Vg1Metric

     , 'Vg1Head'

     ,'Vg1Liv'

     )

     , '$(Vg1Head)

     , $(Vg1Liv)

)

-Rob

View solution in original post

4 Replies
Not applicable
Author

bump!

jagan
Luminary Alumni
Luminary Alumni

Hi,

Please find the attached file.

Hope this helps you.

Regards,

Jagan.

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

You can't force evaluation that way. Would be nice, but as you found you get just a string with a $ in it.

The way I've approached this problem is with a pick(match()) expression.

=pick(

     match(Vg1Metric

     , 'Vg1Head'

     ,'Vg1Liv'

     )

     , '$(Vg1Head)

     , $(Vg1Liv)

)

-Rob

Not applicable
Author

Thank you, Rob! This approach will work.