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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
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?

Labels (1)
17 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

To exclude a site, use  Site-={'site name'}

Hope that helps

Jonathan

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

jonathan

as far as i know this will include only the selected site.

im looking to exclude that site.

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

I think you missed the - sign before the =. That's what does the exclude.

Oh, and don't worry about the syntax error squiggly lines, its a syntax check bug.

Regards

Jonathan

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

ok, this one works,

but it doesnt disable the site dimension from affecting the object...

i have a table box for Site dimension on that page and if i choose a site that was excluded in the expression, value displayed is '0',

unlike a situattion where i wright "QVYear=". in that case a selection made on that dimension will simply not effect the value displayed

Not applicable
Author

Hi,

Following  may work:

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

Regards

http://quickdevtips.blogspot.com/

Not applicable
Author

hi bilge,

if you ment somthing like Site=(site name)

than its not working.

i know it has somthing to do with 'e' added before or somewhere in the expression but cant get to the right syntax

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

It looks like something else in your data model is associating the site with your metric. I suggest that you post your model so that we can look at it in a little more detail.

Regards

Jonathan

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

Hi,

I meant something like in the attached file.

Though, I am not sure if it is what you are looking for.

Best regards,

http://quickdevtips.blogspot.com/

Not applicable
Author

bilge,

no, this is not what im looking for.

jonathan,

the full expression is:

round(sum({$<QVYear=,QVYearHlf=,QVYearQtr=,QVYearMonth=,QVMonthName=,QVQtr=, Site={AU}>}if(Flag_ComYR=1,Charge,0))+

sum({$<QVYear=,QVYearHlf=,QVYearQtr=,QVYearMonth=,QVMonthName=,QVQtr=, Site={AU}>}if(Flag_PMonth=1,Charge,0))*(12-

     if(num(Day(today()),'00')>=10,

     num(Month(Date(today())),'00')-2,

     num(Month(Date(today())),'00')-3)))

this expression returns the EOY forcast for our site in australia.

now i want to add another object that will returne total EOY forcast for all sites excluding the one in australia.

in dimension site i have 6 different values.