Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
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
Author

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
Author

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
Author

Hi All

Can some one help me on this ?

Paul

afurtado
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi Paul.

I tried with alternate state.

Alessandro Furtado

furtado@farolbi.com.br
Not applicable
Author

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

afurtado
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi Paul.

Maybe is ok now.

Alessandro Furtado

furtado@farolbi.com.br
Not applicable
Author

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