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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set analysis based on multibox selection

Hi,

I am making use of a set analysis function for an expression. A field 'name' can be selected by a multibox, but does not always have a selection. I would like to base the set analysis on the selection of 'name' in the multibox, ONLY when there are one or more names selected.

So the set analysis looks like:

sum({< name=, eng_partner_name={name}, eng_costcenter_key = {$(vCostCenter)}, emp_level = {'junior'}>} timeAmount)

The current problem with this set analysis is that none of the 'eng_partner_name' records are selected when there has been no selection on the multibox.

How to get this fixed?? I prefer to avoid if functions.

1 Solution

Accepted Solutions
lironbaram
Partner - Master III
Partner - Master III

hei

try this

sum({< name=, eng_partner_name=P(name), eng_costcenter_key = {$(vCostCenter)}, emp_level = {'junior'}>} timeAmount)

what it does it check if  eng_partner_name is in the possible values of name

View solution in original post

3 Replies
klausskalts
Partner - Creator
Partner - Creator

This might not be what you are looking for - but when I this "problem" it's normally because I do not want the cagrt to calculate at all before selections have been made.

If this is the case I suggect that to setup a Calculation condition in the General Tab in the Chart Properties.

e.g. Count(distinct [Field]) >=1

and in the Error Messages you state that a selection must be made before the chart/table will show any value.

OK?

lironbaram
Partner - Master III
Partner - Master III

hei

try this

sum({< name=, eng_partner_name=P(name), eng_costcenter_key = {$(vCostCenter)}, emp_level = {'junior'}>} timeAmount)

what it does it check if  eng_partner_name is in the possible values of name

Not applicable
Author

This works perfectly Liron!

Never heard of that function before, but I'll keep it in mind.

Thanks!