Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

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

Variable concatenated with $ not evaluating

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

4 Replies
Not applicable

Variable concatenated with $ not evaluating

bump!

MVP
MVP

Re: Variable concatenated with $ not evaluating

Hi,

Please find the attached file.

Hope this helps you.

Regards,

Jagan.

Variable concatenated with $ not evaluating

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

Variable concatenated with $ not evaluating

Thank you, Rob! This approach will work.

Community Browser