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

expression that ignores any selection apart from 3 fields

Hi all,

i am trying to get a chart to ignore any selections made aprt from 3 fields. so if the user selects any fields apart from the 3 allowed then the charts won't change.

i am using variables as expressions.

expression 1

$(vItemCount_Listings)

expression 2

$(vTargetSum_Listings)

I want them to ignore any selections apart from the following 3

it_objective_name

territory_region

JOIN_territory

Can anyone help please?

5 Replies
Not applicable
Author

You should use Set Analysis this is an example:

=Sum( {$<YEAR = {2011}, COUNTRY = {USA}>} [IMP USD] )

this will give you only the sales for USA in 2011 no mater what selections you do.

Hope this Helps!!

Not applicable
Author

hi, how can i get it to include all values of the 3 fields though and exclude all values of all olther fields. ?

so in expression 1:

i want the chart to IGNORE any selections made in all fields apart from

it_objective_name

territory_region

JOIN_territory

So selects can be made in the above 3 fields (any value) and the chart is to react to them.

Thanks

Not applicable
Author

Hi,

We can do it by using set analysis. For an example, if you want to get the sum of sales amount excluding the country selection made, you can have formula mentioned below.

Sum({$<Year={$(=(vYear))},Country=>}Sales_Amount)

Hope this will help you to get the solution.

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

sum({$<[$(=Concat({1<$Field-={'it_objective_name','territory_region','JOIN_territory'}>}distinct $Field,']=,[')&']=')>} Amount)


talk is cheap, supply exceeds demand
Not applicable
Author

Hi Gysbert,

Thanks but that didnt work. I think it's because of the SUM. if i just use sum($(vItemCount_Listings)) then i get nothing, so the expression i use is just the variable $(vItemCount_Listings).

How would i use your example but without using the SUM function?