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

Extract Excluded set

Dear All,

Consider the table below:

PlantConumer      Qty
XA10
XB12
XC14
YD10
YA11
ZC18
ZE20

I want to create a Straight table which will show the list of cunsumer [along with sum(Qty)] that are not linked with the selected Plant.

For example, if any user select 'X' from Plant list, the resulted table should be as below:

PlantConumersum(Qty)
YD10
ZE20

Pls. note that this needs to be done in expression level not in script level.

Any help would be highly appreceated.

Thanks & Regards,

Somnath

1 Solution

Accepted Solutions
Miguel_Angel_Baeyens

Hi Somnath,

Use a set analysis with the E() function. Note that if there is no value selected, the chart will not return anything, so I'd use it together with a calculation condition. The cahrt will have Plant and Consumer as dimensions, and the following as expression:

Sum({< Plant = E(Plant), Consumer = E(Consumer) >} Qty)

The calculation condition might be

GetSelectedCount(Plant)

Hope that helps.

Miguel

EDIT: Added the exclusion of Consumer.

View solution in original post

3 Replies
Miguel_Angel_Baeyens

Hi Somnath,

Use a set analysis with the E() function. Note that if there is no value selected, the chart will not return anything, so I'd use it together with a calculation condition. The cahrt will have Plant and Consumer as dimensions, and the following as expression:

Sum({< Plant = E(Plant), Consumer = E(Consumer) >} Qty)

The calculation condition might be

GetSelectedCount(Plant)

Hope that helps.

Miguel

EDIT: Added the exclusion of Consumer.

orital81
Partner - Creator III
Partner - Creator III

Hi Somnath

1 possible solution is adding a triger on the first table:

Setting -> Sheet Properties --> Triggers

Choose your sheet object (The first table) and add a trigger on activate.

The action name will be select excluded and choose the field Plant.

This should do the work.

somenathroy
Creator III
Creator III
Author

Many Thanks all of you for your reply.