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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Help need - set analysis

Dear all,

I have table table with companyid and salesamount fields.

companyids like 1,2,3,4,5,6

if i select one companyid like 1, the remaining companyids are excluded.

but i dont know how to show the excluded values in the text object.

i have two text objects. one is for current selection and another one is for companyid 2.

if i select 1 then sum(sales) for companyid 2 shows 0.

could anyone help me...

6 Replies
Not applicable
Author

Hi,

Try Sum({$<companyid={2}, companyid=>} sales) in the second text object. This will now not be affected of choices between company id…

/@Ungvall

Not applicable
Author

You can use sum({<companyid={2}>} sales) for the companyid 2

Not applicable
Author

Hi

thanks for your reply..

sorry,i missed some of the things..

i have three fields like company id, offsetCompayid,sales

table look like

Compaid     offsetcompid    sales

1               2                      1000

2               3                       1900

3                1                      2000

etc

if i select the compid 1 then i need to show the sum(sales) for Compid 1 and offsetid =1.

similarly if i select compid 2 then i need to show the sum for Compid 2 and offsetid =2. in two text objects.

could you please help me...

thanks in advance..

Not applicable
Author

Hi,
If I understand you right...

Text object 1 Companyid:

Sum(sales)

Text object 2 Offsetid:

Sum(If(Compid=offsetcompid, sales))

/@Ungvall

Not applicable
Author

Hi

Its not working in my case...

could you please share the sample file..

the output look like

in straight table

Compaid     sum(offsetcompid=compid)Sales)    sales

1               2000                                                   1000

2              1000                                                     1900

3               1900                                                  2000

dpietersz
Creator
Creator

I would do it with 2 sum expressions in combination with the concat function (so you can select multiple compaid's).

I've attached a example.

Hope this is what you are looking for.