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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

exclude sintax in set analysis

hello,

i have the following expression that im using to calculate EOY forcast:

sum({$<QVYear=,QVYearHlf=,QVYearQtr=,QVYearMonth=,QVMonthName=,QVQtr=, Site=>Sales}

logic is to disable time dimensions from this object. later on i multiply it by number of month to end of year...

now, i have to objects, one displays total forcast for EOY,

and in the other, i want to relate to a spesific site. in that case i add Site={site name}.

now i want to add an object that will calculate total forcast excluding the site selected in the above expression. how?

17 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

Not quite the same as uploading your model , but looking at the expression in isolation I can't see any reason why replacing the Site={'AU'} with Site-={'AU'} (both instances) does not work. Perhaps you have null sites; -= will not return null values??

Regards

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

hi jonathan,

as i said before, your solution does work.

but,

if we use an expression like {site=}, then a table box with that dimension will not effect your object. just like i used QVYear=,QVYearHlf=,....

but when using site-={au}, it work but if user uses the site table box and select a different site than AU, the object will display null instead of not being effected like with the other expression....

i hope it makes more sense now....

jonathandienst
Partner - Champion III
Partner - Champion III

I think I understand what you are saying, although it is not the behaviour I would expect. Without access to your model and a more in depth analysis of the model, it is hard to explain the behaviour or to propose a solution.

Regards

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

jonathan,

i uploaded a model.

in the model u have 3 gauges where two of them use set analysis to present a specific site and the middle one uses set analysis to exclude the first two sites....

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

I don't see your model. Reply to this post, go to "Use Advanced Editor" and then click browse (under Attach Files) to locate the file to upload and click Post Message to upload the file.

Regards

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

well i added it to the initial discussion but here it is again....

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

Still not quite sure what you are trying to achieve. To show the expressions for IN/AU and for everything excluding IN/AU is not complex.

You have other exclusions in the expression and I dont know how these are affecting the results. Bear in mind that these exclusions will be cumulative - only records that pass all the exclusions will be considered.

Try to get the correct behaviour with a simple expression first, something like

sum({$<Site-={IN,AU}>} Charge)

Then, when you have the correct behaviour, expand the expression one step at a time. If it breaks, then at least you will know where the problem is.

Regards

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

hi,

as i said before, expression is ok and working.

no break downs.

the issue was that if i exclude IN for example, when user selects IN through a table box (for a different object on that same page), the expression will return 0. and this behavior is not as expected (you said so as well).

i whould expect the expression that excludes IN to not react to a selection of IN.