Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Dollar-sign expansion for expressions?

I'm trying to understand how the Dollar-sign expansion works. It doesn't behave like I expect from reading the Help in Qlikview.

For testing I create a Text object on a sheet, and test out a number of variants of dollar-sign expansion expressions in the foreground text.

=$(=1 + 2)     output is '3'

=$(=1 & 2)     output is '12'

=$(='1' & '2')   output is '12'

=$(='A' & '2')   output is -     <-- Why doesn't this work

The problem I'm looking to solve would require a Dollar-sign expansion where the result is a text, not a  number, but from the third expression above you can see that it fails as soon as the result can't be expressed as a number.

Why? Is there something I'm missing?

1 Solution

Accepted Solutions
sbaldwin
Partner - Creator III
Partner - Creator III

Hi I have found that sometimes when using character strings in dollar expansions i need to wrap the dollar expansion in quotes, ie

='$(='A' &'2')'

should return A2 as expected

Thanks

Steve

View solution in original post

4 Replies
stephencredmond
Luminary Alumni
Luminary Alumni

Hi,

I think that you might have found a bug there!

I have checked in v8.5 and 10 SR3 and can replicate.

Saying that, it is not something that I have come up against in the last 5 years or so.

Stephen

sbaldwin
Partner - Creator III
Partner - Creator III

Hi I have found that sometimes when using character strings in dollar expansions i need to wrap the dollar expansion in quotes, ie

='$(='A' &'2')'

should return A2 as expected

Thanks

Steve

Not applicable
Author

Thanks Steve!

That works for the example, and I think it will work with my project.

I also didn't know I can use quotes inside quotes like that. Good to know.

Best regards,

Joakim

stephencredmond
Luminary Alumni
Luminary Alumni

Great spot there Steve.

I should have thought of it myself because it is something that you run into with text variables in the script.

Regards,

Stephen