Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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:
Operator | Description |
---|---|
+ | 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!!
This
Sum({<ICC = P({<Grupo_Articulo_Report_Desc={"Le*"}>})*P({<Grupo_Articulo_Report_Desc={"Mon*"}>})>}[Importe con IVA])
Try this instead
Sum({<Customer = p({<Article_Set={"ProductA*"}>})*p({<Article_Set={"ProductB*"}>})>}[Sales])
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.
Luis
This
Sum({<ICC = P({<Grupo_Articulo_Report_Desc={"Le*"}>})*P({<Grupo_Articulo_Report_Desc={"Mon*"}>})>}[Importe con IVA])
Thanks for the answer, I have tested the formula and works perfect!!
Thanks a lot!!