Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

nikhilgarg
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
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)

Or as in your example:

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
Employee

Re: Query regarding Expression

Hi Nikhil - try this

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

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

Mike

Employee
Employee

Re: Query regarding Expression

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

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

8-20-2014 7-49-20 AM.png

HTH

Mike

Employee
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)

Or as in your example:

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

nikhilgarg
Contributor III

Re: Query regarding Expression

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

nikhilgarg
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
Employee

Re: Query regarding Expression

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

Mike

nikhilgarg
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
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
Employee

Re: Query regarding Expression

Here is the direct link with the navigation:

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

8-21-2014 8-21-08 AM.png

Set Analysis:

8-21-2014 8-22-07 AM.png