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

getfieldselections in expression - Problem

Hi,

i make an expression:

Count(DISTINCT{1<price= {"<=3"}, country = {"$(=getfieldselections(country))"}>} sales)

If i select for "country" 1 country like "USA" the chart shows the data

If i select for "country" : "USA", "Germany" the chart doesn´t show the data.

If i test it by this expression the chart shows the correct data:

Count(DISTINCT{1<price= {"<=3"}, country = {"USA","Germany"}>} sales)


What must i do that this expression shows the data?:

Count(DISTINCT{1<price= {"<=3"}, country = {"$(=getfieldselections(country))"}>} sales)


regards,

Fritz


1 Solution

Accepted Solutions
sunny_talwar

Try one of these instead:

Count(DISTINCT{1<price= {"<=3"}, country = $::country>} sales)

or

Count(DISTINCT{1<price= {"<=3"}, country =p(country)>} sales)

View solution in original post

7 Replies
sunny_talwar

Try one of these instead:

Count(DISTINCT{1<price= {"<=3"}, country = $::country>} sales)

or

Count(DISTINCT{1<price= {"<=3"}, country =p(country)>} sales)

sunny_talwar

If you do want to go the route of your current method, then you can try this:

Count(DISTINCT{1<price= {"<=3"}, country = {$(=Chr(39) & GetFieldSelections(country, Chr(39) & ', ' & Chr(39), 100) & Chr(39))}>} sales)



Anonymous
Not applicable
Author

Hi Sunny,

i have try all your offers, but it doesn´t run.

Is there something to change at Chr(39) i have a german version?

regards,

Fritz

sunny_talwar

Chr(39) returns a single quote. Not sure what would be a german version for it.

Besides, would you be able to share a sample to show the issue?

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try this expressions

Count(DISTINCT{1<price= {"<=3"}, country = {"$(=chr(39)  & getfieldselections(country, chr(39) & ',' & chr(39)) & chr(39), 1000)"}>} sales)

Regards,

Jagan.

Anonymous
Not applicable
Author

Hi Sunny,

sorry, it was a mistake by me, your solution helps! Thank you very much!

regards,

Fritz

sunny_talwar

Awesome , I am glad I was able to help