Skip to main content
Announcements
Qlik Community Office Hours, March 20th. Former Talend Community users, ask your questions live. SIGN UP
cancel
Showing results for 
Search instead for 
Did you mean: 
limingthefirst
Contributor III
Contributor III

Sum intersection

Hi everyone,

I have a trouble to sum intersection and union value.

For example:

Red color is attributes for S1, then I need to sum each A and C value,

sum(A) should be 6

sum(C) should be 24

111.png

When I select null of F4, I need each value of sum(F1)

This logic is in one sheet of report, and 2 hundred million data in fact qvd.

I've tried to group by this in script, but it is too slow and has linkage issue in report when I select other dimensions

The value maybe calculated in text object and bar chart and so on.

Can anybody give me some suggestions to me?

Thanks all.

The requirement is changed...

Add sample here

1 Solution

Accepted Solutions
sunny_talwar

May be this

=Count({<VENDOR=p(VENDOR),VENDOR={"=Count(DISTINCT {<COUNTRY>} COUNTRY)>1"}>}DISTINCT VENDOR)

View solution in original post

18 Replies
Anil_Babu_Samineni

May be use Aggregation like When should the Aggr() function NOT be used?

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
limingthefirst
Contributor III
Contributor III
Author

Hi Anil,

Thanks for your link,

I've tried it =SUM(TOTAL <F1> F3)

but it is not what I want when select S1:

333.png

444.png

Anil_Babu_Samineni

You mean, You want to compare row level like S1 having C which has common to all. So, You need to pick 7+8+9 ??

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
limingthefirst
Contributor III
Contributor III
Author

Yes, sum(C)=7+8+9, sum(A)=1+2+3

Anil_Babu_Samineni

Can you attach your sample?

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
tresesco
MVP
MVP

May be this:

=SUM(TOTAL <F1> {1} F3)* Avg(1)

limingthefirst
Contributor III
Contributor III
Author

I like your answer, It's working, but there is an issue is that when I select S1 and the total result is 45 not 30.

limingthefirst
Contributor III
Contributor III
Author

Hi Anil, I've upload demo.qvw for you, and the requirement is changed, the comment is added in qvw file. thanks.

Anil_Babu_Samineni

May be this?

=SUM({$<COUNTRY>}QTY)

OR

=SUM({1} QTY)

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)