Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

How to passing field = BRAND1 into my expression ?

Hi All

Below expression working fine at TABLE A :-

=If(Count({<BRAND+={'BECKHOFF'}>} DISTINCT BRAND) >1, 1, 0)

The word 'BECKHOFF' if fix , unable to change.

I have create a field = BRAND1 , and i like to make it allow user to select any brand they like. can some one share with how to modify the expression ?

Some thing like below at TABLE B , but not working :-

=If(Count({<BRAND+={BRAND1+}>} DISTINCT BRAND) >1, 1, 0)

7 Replies
Not applicable

Re: How to passing field = BRAND1 into my expression ?

Hi,

     try like this....

     1. First load Brand1 field alone without any link with other table otherwise it will be select brand accordingly.

     2. declare one variable as:

    

          vBrand = ='(' & GetFieldSelections(BRAND1,'|')  &  ')'

     3. after that use this expression in your second expression:

          =If(Count({<BRAND={"+=$(VBrand)"}>} DISTINCT BRAND) >1, 1, 0)

  I am not sure that it will work. So try this and let me know.

hope this helps you

Regards,

Ashutosh

Not applicable

Re: Re: How to passing field = BRAND1 into my expression ?

Hi Sir

Many thank for your very detail instruction. I can follow and only detect one VBrand should be vBrand. But i it does not list the 4 company i excepted. enclosed my QV doc. ( pls note i load inline for BRAND1 at last Tab ) , I also create variable for vBrand. i think i must hv missing some thing.

Not applicable

Re: How to passing field = BRAND1 into my expression ?

Hi All

Can some one help me on this ?

Paul

MVP
MVP

Re: Re: How to passing field = BRAND1 into my expression ?

Hi Paul.

I tried with alternate state.

Alessandro Furtado

Not applicable

Re: Re: Re: How to passing field = BRAND1 into my expression ?

Hi Sir

Thank for your sharing .

Your below expression cannot work :-

'=If(Count({<BRAND+=$::BRAND>} DISTINCT BRAND) >1, 1, 0)

Because , if it working fine , meaning the table will look like Table A. , Now Table B is null.

For Table expression as below is working fine :-

=If(Count({<BRAND+={'BECKHOFF'}>} DISTINCT BRAND) >1, 1, 0)

and user if force on BRAND=BECKHOFF, unable to change to other brand like OTHER , MITSUBISHI....

So what i need is make use of BRAND1 to make the expression dynamic and flexiable.

My purpose ts to list customer who buy brand A and Brand B. and Band A and Brand can be combine of any 2 brand.

Paul

MVP
MVP

Re: Re: Re: Re: How to passing field = BRAND1 into my expression ?

Hi Paul.

Maybe is ok now.

Alessandro Furtado

Not applicable

Re: How to passing field = BRAND1 into my expression ?

Hi Aless

I notice that you hv modify the expression , as from the expression label , it show all brand able to display out.

Now only issue is if i select BRAND=HAKKO and BRAND1=BECKHOFF, both table display must display same result. buit it is not same.

Table A list 4 coy - correct

Table B list 0 coy - wrong

May i know how to make Table  B list 4 company ?

Paul