Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

set analysis

Can someone help me on this question?

I have a table contain quite a few fields like below. Lets say two of fields are A and B. I want to calcuate sum(A*B). The question is that I expect sum(A*B) equals to 10+2+18. but it is not.


table:

---------------------------

key, A, B, A*B...

1    , 2, 5, 10,...

2    , 1, 2, 2,...

3    , 6, 3, 18,...

---------------------------

if I select key field 1, the table become like below, just have the first row.

------------------------------

key, A, B, A*B...

1    , 2, 5, 10,...

------------------------------


I expected sum(A*B) = 10. But its calcuated result is (2+1+6)*5=45.

if I did sum(B)*A it will give me 5*2=10

I am confused. Under the current selection, A should just be number 2, why when I did sum(A*B), it sum all A value (2, 1, 6)?


Thanks,

1 Reply
felipe_dutra
Partner - Creator
Partner - Creator

Hello!

The results reported by Qlikview is this:

Tab:

LOAD * Inline

[

key, A, B, AxB

1, 2, 5, 10

2, 1, 2, 2

3, 6, 3, 18

];

keyABAxBSum(A*B)
30
1251010
21222
3631818

keyABAxBSum(A*B)
10
1251010

Felipe