Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
luisccmm
Creator
Creator

Intersection Operator * Qlik Sense

Hi. I am using Qlik Sense 3.1 and I am not finding a solution for the  Intersection of two sets.

I just need to get the SUM of Sales of Costumers who have bought Product A and also bought Product B. Although the sales of product A and B will not be on the same row of the data file.

Is that feasable? I have been able to use the "+" operator, that shows the ones that have bought Product A or B. But I need to use the "*" operator to just narrow it.

Arguments:

OperatorDescription
+Union. This binary operation returns a set consisting of the records that belong to any of the two set operands.
-Exclusion. This binary operation returns a set of the records that belong to the first but not the other of the two set operands. Also, when used as a unary operator, it returns the complement set.
*Intersection. This binary operation returns a set consisting of the records that belong to both of the two set operands.
/Symmetric difference (XOR). This binary operation returns a set consisting of the records that belong to either, but not both of the two set operands.

Are all set operator working in Sense as in QView?

Formula with the Problem:

Result Obtained: 0

Sum(

{<

Article_Set={"ProductA*"}

>*<

Article_Set={"ProductB*"}

>}

[Sales])

Please Help!!

1 Solution

Accepted Solutions
sunny_talwar

This

Sum({<ICC = P({<Grupo_Articulo_Report_Desc={"Le*"}>})*P({<Grupo_Articulo_Report_Desc={"Mon*"}>})>}[Importe con IVA])

View solution in original post

4 Replies
sunny_talwar

Try this instead

Sum({<Customer = p({<Article_Set={"ProductA*"}>})*p({<Article_Set={"ProductB*"}>})>}[Sales])

luisccmm
Creator
Creator
Author

Hi Sunny,

Thanks for your quick response. Looks like there is some problem with the translation of your syntax to mine.

Error displayed:

error in set modifier element function name: Por E expected

Sum({<ICC = P({Grupo_Articulo_Report_Desc={"Le*"}>})*P({<Grupo_Articulo_Report_Desc={"Mon*"}>})>}[Importe con IVA])

Thanks in advance for your help.

Error P and E.png

Luis

sunny_talwar

This

Sum({<ICC = P({<Grupo_Articulo_Report_Desc={"Le*"}>})*P({<Grupo_Articulo_Report_Desc={"Mon*"}>})>}[Importe con IVA])

luisccmm
Creator
Creator
Author

Thanks for the answer, I have tested the formula and works perfect!!

Thanks a lot!!