Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
smilingjohn
Specialist
Specialist

expression error

textEror.PNGhi All

i have caluted values in the variable and trying to show this value by dollar symbol but its showing error , can someone please correct me how to write this

please find the screenshot

1 Solution

Accepted Solutions
marcus_sommer

The syntax is wrong. There is an extra bracket before your second vcurrencysymbol-variable - and they makes no sense because both parts of the formatting are the same - and then there is a missing closing-bracket after the formatting. And of course it will be only work if your first variable contained something like:

num($(vFcon) - $(vFxe)

Another point is the $-sign within the variable-name. I have never tried if it will work but in general the special-chars respectively statements of a program should be avoided in any names - it might cause strange errors which are difficult to find.

Beside the invaluable usefulness of variables the usage could be exaggerated when applied to nearly each (part of an) expression. The use should be simplify things and not add a rather big amount of complexity or administration to handle them - just a suggestion ...

- Marcus

View solution in original post

7 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Screenshot missing.

Anyways you can try adding '=' sign at starting of expression, if you have not added.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
tajmohamed30
Creator III
Creator III

have you tried applying the format in the numbers tab and remove here in the expression

sunny_talwar

How do you define vMet$ here?

Kushal_Chawda

what is the expression variable?

smilingjohn
Specialist
Specialist
Author

Hi Sunny

vMet has two variable it is sutituing vFcon-vFxe

sunny_talwar

How are vFcon and vFxe defined?

marcus_sommer

The syntax is wrong. There is an extra bracket before your second vcurrencysymbol-variable - and they makes no sense because both parts of the formatting are the same - and then there is a missing closing-bracket after the formatting. And of course it will be only work if your first variable contained something like:

num($(vFcon) - $(vFxe)

Another point is the $-sign within the variable-name. I have never tried if it will work but in general the special-chars respectively statements of a program should be avoided in any names - it might cause strange errors which are difficult to find.

Beside the invaluable usefulness of variables the usage could be exaggerated when applied to nearly each (part of an) expression. The use should be simplify things and not add a rather big amount of complexity or administration to handle them - just a suggestion ...

- Marcus