Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

toddbuss
New Contributor III

Noob question related to getfieldselections

I'm putting conditional logic based on which fields are selected. 

Can anyone tell me why the first condition below ='ALL' works, but the second condition ='-' does not?

if(getfieldselections(SGradeInitialValue)='ALL',1/total_population,

//condition is positive when all are selected

if(getfieldselections(SGradeInitialValue)='-',1/total_population,

//condition should be positive when none are selected

Thanks.

Tags (1)
1 Solution

Accepted Solutions
MVP
MVP

Re: Noob question related to getfieldselections

May be try this:

if(Len(Trim(getfieldselections(SGradeInitialValue))) = 0, 1/total_population,

2 Replies
MVP
MVP

Re: Noob question related to getfieldselections

May be try this:

if(Len(Trim(getfieldselections(SGradeInitialValue))) = 0, 1/total_population,

toddbuss
New Contributor III

Re: Noob question related to getfieldselections

Thanks.  Worked like a charm.

The quirkiness of the Qlik syntax continually baffles me.