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

Field value as Expression

Hi all, this is my first post here. I'm normally able to easily find the solution I'm looking for just by searching the forum but not today. I've come accross a problem which would best be solved if I were able to force Qlikview to assess the value held in a field as an expression. Now I've found if I use the following:

$(=Expression)

Where Expression is the field containing the expressions. This works when either there is only a single value in the table or I have selected a single value, but when there are multiple expressions defined in the table it frustratingly doesn't seem to work.

Does anyone out there have a trick up their sleeve to help me? Thanks in advance for any suggestions!

7 Replies
Miguel_Angel_Baeyens

Hello,

You can use

$(=GetFieldSelections(Expression, Chr(34) & ',' & Chr(34)))
Chr(34) is ASCII code for doble quotes. The idea is not mine, but NMiller's. I've got this one as favourite.

Hope this helps!

Not applicable
Author

Hi Miguel,

I gave it a go but it doesn't appear to work, is that solution reliant on some specific setup in the data?

Miguel_Angel_Baeyens

I'm using that in some set analysis expressions, that need to separate values by double quotes. You can try without them if your chart or expression doesn't need them.

Not applicable
Author

This is very strange for the life of me I cannot get GetFieldSelections() to return anything...

Miguel_Angel_Baeyens

Try a simple textbox with

=GetCurrentSelections(yourDateFieldHere or yourCityCodeHere)
and do some selections to see how it changes, if any.

Not applicable
Author

That seems to work fine but GetFieldSelections still doesn't seem to want to work 😞

I have attached (hopefully) an example the should be able to better demonstrate what i'm trying to accomplish...
I could do it with a large if statement but given the number of expressions this would just be a pain.

prieper
Master II
Master II

the attached should do it, Miguel has pointed you already the right way

Peter