# New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Contributor III

## Query regarding Expression

1 : According to me following Expression should return Sum of all the sales excluding the current selection with Company Name 'A'.

2:  But it is return somewhere that it will return Company 'A' Sales excluding current selection.

=Sum({1 - \$<Company_Name = {'A'}>} Sales)

Where Company_Name is a Field

Is option 1 correct or 2 correct and if 2 is correct den why? Please clear my doubt.

1 Solution

Accepted Solutions
Employee

## Re: Query regarding Expression

For your reference - Set Analysis Expressions start to get easier and easier the more you used them.

Your example WAS ALSO Correct - except you need to use " " in the set {} instead of ' '

So this will also work:

Sum({1-\$<PLANTLNG={"Orlando"}>}LINEPRICE)

Sum({1-\$<Company_Name={"A"}>} Sales)

Here is a great post on the topic:  Set Analysis: syntaxes, examples

If you search the forums you may find others as well.

Mike

12 Replies
Employee

## Re: Query regarding Expression

Hi Nikhil - try this

Sum({<PLANTLNG-={"Orlando"}>}LINEPRICE)

Notice the - before the = sign - this worked for me:

Mike

Employee

## Re: Query regarding Expression

If you are using Sense, create a new Measure with this syntax:

Sum({<Company_Name -= {'A'}>} Sales)

HTH

Mike

Employee

## Re: Query regarding Expression

For your reference - Set Analysis Expressions start to get easier and easier the more you used them.

Your example WAS ALSO Correct - except you need to use " " in the set {} instead of ' '

So this will also work:

Sum({1-\$<PLANTLNG={"Orlando"}>}LINEPRICE)

Sum({1-\$<Company_Name={"A"}>} Sales)

Here is a great post on the topic:  Set Analysis: syntaxes, examples

If you search the forums you may find others as well.

Mike

Contributor III

## Re: Query regarding Expression

HEy,Thanx mike. I will surely go through the pdf u mentioned.

Contributor III

## Re: Query regarding Expression

Hey Mike,

I would love to work in QLik Sense but Qlik Sense Server and Qlik Sense Publisher is not yet released. Can you tell me when they will get released , please??

Employee

## Re: Query regarding Expression

Hi Nikhil - this September time frame we are told. Some very exciting stuff coming this way.

Mike

Contributor III

## Re: Query regarding Expression

HEy mike ,

Can you tell me from where can i learn the use of various predefined functions used in edit Script like Trigonometric functions , Number Interpretation , String and more... I really dont know many of their uses. Thanx

Employee

## Re: Query regarding Expression

Hi Nikhil - sure check out the Sense help and documentation site:

Working with Qlik Sense > Loading data > Script syntax > Script functions

Let me know, if this is helpful.

Mike

Employee

## Re: Query regarding Expression

https://help.qlik.com/sense/en-US/online/index.html

Set Analysis: