Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

paulyeo11
Valued Contributor II

Why this expression not work =IF(GROUP_CLASS="G3",COMPANY)

Hi All

I want to filter only display those customer handle by G3.

So instead of COMPANY field at dimension.

I replace with :-

=IF(GROUP_CLASS="G3",COMPANY)

But it got error , does not filter , and not display any company.

Paul

1 Solution

Accepted Solutions
MVP
MVP

Re: Why this expression not work =IF(GROUP_CLASS="G3",COMPANY)

It works for me, please review your expression.

qcomGROUP_CLASS_COMPANY.png

15 Replies
sureshqv
Esteemed Contributor III

Re: Why this expression not work =IF(GROUP_CLASS="G3",COMPANY)

try this

=if(match(GROUP_CLASS,'G3'),GROUPCLASS)

MVP
MVP

Re: Why this expression not work =IF(GROUP_CLASS="G3",COMPANY)

If both fields exist in the data model and G3 is a value in the field GROUP_CLASS, then use single quotes instead of doubles in the If() comparison.

paulyeo11
Valued Contributor II

Re: Why this expression not work =IF(GROUP_CLASS="G3",COMPANY)

Hi Miguel

I have try :-

=IF(GROUP_CLASS='G3',COMPANY)

it still not display any thing,

Paul Yeo

paulyeo11
Valued Contributor II

Re: Why this expression not work =IF(GROUP_CLASS="G3",COMPANY)

Hi Chanty

I try below , i get invalid expression :-

=IF(match(GROUP_CLASS,'G3',COMPANY)

Paul

sureshqv
Esteemed Contributor III

Re: Why this expression not work =IF(GROUP_CLASS="G3",COMPANY)

try this

=if(match(GROUP_CLASS,'G3'),Company)

paulyeo11
Valued Contributor II

Re: Why this expression not work =IF(GROUP_CLASS="G3",COMPANY)

Hi Chanty

it does not work , i does not filter G3 , and display all company. no error

Paul

MVP
MVP

Re: Why this expression not work =IF(GROUP_CLASS="G3",COMPANY)

Can you share at least a screenshot where we can see two listboxes, one for GROUP_CLASS with G3 selected and another for COMPANY?


Are you sure there are values?

paulyeo11
Valued Contributor II

Re: Why this expression not work =IF(GROUP_CLASS="G3",COMPANY)

Hi Miguel

Enclosed my QVW

MVP
MVP

Re: Why this expression not work =IF(GROUP_CLASS="G3",COMPANY)

It works for me, please review your expression.

qcomGROUP_CLASS_COMPANY.png

Community Browser