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

Don't Include Data unless selected

Hi,

I want my data to exclude a certain field unless the selection for it on the list box is selected. Is this possible? I was trying set analysis but cannot get it.

According to this page, the below set analysis excludes the year 2000 unless it is selected.

Set modifiers with set operators ‒ Qlik Sense

sum( {$<Year = Year + ({“20*”,1997} – {2000}) >} Sales )

My set analysis is as follows. FieldB has two options, Y and N. I want the data to exclude FieldB Y values unless I select it from a listbox.

Sum({$<FieldB = FeldB -({Y}) >}FieldA)

5 Replies
vishsaggi
Champion III
Champion III

May be try this?

= Sum({$< FieldB = {"*"} - {'Y'} >} FieldA)

sunny_talwar

May be this

=Sum({<FieldB -= {'Y'}>+<FieldB = {"$(=GetFieldSelections(FieldB))"}>}FieldA)

greend21
Creator III
Creator III
Author

Closer, but this then ONLY shows field B when selected

sunny_talwar

It is showing me N without selection, what is the problem?

Capture.PNG

trdandamudi
Master II
Master II

I modified Sunny expression, Is this what you are looking for?

If(GetFieldSelections(FieldB)>1,
Sum(FieldA),
Sum({<FieldB -= {'Y'}>+<FieldB = {"$(=GetFieldSelections(FieldB))"}>}FieldA))