Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Indirect Set Analysis

Hello,

I need some help

I want to get customer for the current selection but I want exclude customer who bought and item and cutomer who bought items from a brand.

Expression 1:

Sum({$<COD_TARJETA-=p({1<COD_ART={$(Articulo_excluir)}>}COD_TARJETA)>}IMP_VTA_LINEA)

Expression 2:

Sum({$<COD_TARJETA-=p({1<COD_MARCA={$(Marca_excluir)}>}COD_TARJETA)>}IMP_VTA_LINEA)

COD_TARJETA = Customer

COD_ART = Item

Articulo_excluir=Item to exclude

IMP_VTA_LINEA=Sales

COD_MARCA=Brand

Marca_excluir= Brand to exclude

Every expression works fine.

But get both exclusion in only one expression does not work. I use:

=Sum({$<COD_TARJETA-=P({1<COD_MARCA={$(Marca_excluir)}>}COD_TARJETA),COD_TARJETA-=P({1<COD_ART={$(Articulo_excluir)}>}COD_TARJETA)>}IMP_VTA_LINEA)

Any idea

Thanks

Labels (1)
1 Solution

Accepted Solutions
swuehl
Champion III
Champion III

You have two different set modifiers for field COD_TARJETA, this will not work as expected.

Try like

=Sum( {$<

COD_TARJETA =

               COD_TARJETA -

               (

                    P({1<COD_MARCA={$(Marca_excluir)}>}COD_TARJETA)

                    + P({1<COD_ART={$(Articulo_excluir)}>} COD_TARJETA)

               )

>} IMP_VTA_LINEA)

View solution in original post

2 Replies
swuehl
Champion III
Champion III

You have two different set modifiers for field COD_TARJETA, this will not work as expected.

Try like

=Sum( {$<

COD_TARJETA =

               COD_TARJETA -

               (

                    P({1<COD_MARCA={$(Marca_excluir)}>}COD_TARJETA)

                    + P({1<COD_ART={$(Articulo_excluir)}>} COD_TARJETA)

               )

>} IMP_VTA_LINEA)

Not applicable
Author

Thanks swuehl

It works


So simple...