Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

pernillet
New Contributor

How to get past NOT, in the GetFieldSelections

As a part of my expession I have used

if( SubStringCount(GetFieldSelections(Month),'Jan')....

My problem is, when I chose more than half of my months instead of returning jan, feb, mar ...(the selected) then the sting return NOT(Aug, sep,)

So if I aske if the substringcount includes January, and I have selcted everything else but January, then the expression will still tel me, that January is a selcted value.

Is there an easy way to correct this?

Best

Pernille 

1 Solution

Accepted Solutions
MVP
MVP

Re: How to get past NOT, in the GetFieldSelections

Pernille

You could also try something like this:

If(Left(GetFieldSelections(Month), 3) = 'NOT',

          If(SubStringCount(GetFieldSelections(Month),'Jan') = 0,

                    ... Does not contain Jan in NOT form ...

          )

          If(SubStringCount(GetFieldSelections(Month),'Jan') = 0,

                    ... Contains Jan in normal form ...

          )

)

Hope that helps

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
6 Replies

Re: How to get past NOT, in the GetFieldSelections

Have you tried increasing the number of items that GetFieldSelections returns?

getfieldselections ( Month, ',' , 12 )


talk is cheap, supply exceeds demand
MVP
MVP

Re: How to get past NOT, in the GetFieldSelections

Pernille

You could also try something like this:

If(Left(GetFieldSelections(Month), 3) = 'NOT',

          If(SubStringCount(GetFieldSelections(Month),'Jan') = 0,

                    ... Does not contain Jan in NOT form ...

          )

          If(SubStringCount(GetFieldSelections(Month),'Jan') = 0,

                    ... Contains Jan in normal form ...

          )

)

Hope that helps

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
pernillet
New Contributor

Re: How to get past NOT, in the GetFieldSelections

It dit not do any changes

pernillet
New Contributor

Re: How to get past NOT, in the GetFieldSelections

A lot of if's, but usefull

Re: How to get past NOT, in the GetFieldSelections

Weird, works fine for me in QV10.


talk is cheap, supply exceeds demand
pernillet
New Contributor

Re: How to get past NOT, in the GetFieldSelections

I'm also i QV10

Community Browser