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

Ignore selections in listbox

HI qlik community. I have the next situation:

I have 2 listboxes and 1 pie chart, in the chart i am doing a sum based on the selection of both listboxes.

I want to ignore listbox 2 when agf or cdb is selected, but the problem is that user can select 1 or 2 or 3 thogether and I dont know how to handle the sum for that cases. (Also have in mind if user pick cdb and ap or  agf and ap it must sum ignoring selection of listbox 2 for agf and cdb but have the selection for agf)


THanks in advance.

listbox1 listbox 2
AGFND
APD
CDB
1 Solution

Accepted Solutions
jaibau1993
Partner - Creator III
Partner - Creator III

Hi. I've been thinking and I have find out a possible solution. It works for me supposing that I have understood you:

1) If AGF or CDB selected in LB1, sum for all values in LB2

2) If AGF and CDB not selected, sum for all possible values in LB2

3) If AGF or CDB and something else selected in LB1, sum for all values in LB2 when dimension of LB1 is AGF or CDB and sum for all possible values in LB2 instead

then, supposing that Dim1 is the dimension displayed in LB1 and Dim2 in LB2, you should use

Sum( {<Dim1 =, Dim2=, Dim1 -= $::Dim1 - {'AGF', 'CDB'} > + <Dim1-={'AGF', 'CDB'}> } ValueToBeSumed)

check my attached file where I have tried to reproduce your issue (not quite self explanatory, sorry).

Bests,

Jaime.

View solution in original post

2 Replies
jaibau1993
Partner - Creator III
Partner - Creator III

Could you please provide a sample of data?

It is hard to figure out your problem and reproduce it.

Jaime.

jaibau1993
Partner - Creator III
Partner - Creator III

Hi. I've been thinking and I have find out a possible solution. It works for me supposing that I have understood you:

1) If AGF or CDB selected in LB1, sum for all values in LB2

2) If AGF and CDB not selected, sum for all possible values in LB2

3) If AGF or CDB and something else selected in LB1, sum for all values in LB2 when dimension of LB1 is AGF or CDB and sum for all possible values in LB2 instead

then, supposing that Dim1 is the dimension displayed in LB1 and Dim2 in LB2, you should use

Sum( {<Dim1 =, Dim2=, Dim1 -= $::Dim1 - {'AGF', 'CDB'} > + <Dim1-={'AGF', 'CDB'}> } ValueToBeSumed)

check my attached file where I have tried to reproduce your issue (not quite self explanatory, sorry).

Bests,

Jaime.