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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
nikhilgarg
Specialist II
Specialist II

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

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

Regards,
Mike Tarallo
Qlik

View solution in original post

12 Replies
Michael_Tarallo
Employee
Employee

Hi Nikhil - try this

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

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

Mike

Regards,
Mike Tarallo
Qlik
Michael_Tarallo
Employee
Employee

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

Regards,
Mike Tarallo
Qlik
Michael_Tarallo
Employee
Employee

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

Regards,
Mike Tarallo
Qlik
nikhilgarg
Specialist II
Specialist II
Author

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

nikhilgarg
Specialist II
Specialist II
Author

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??

Michael_Tarallo
Employee
Employee

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

Mike

Regards,
Mike Tarallo
Qlik
nikhilgarg
Specialist II
Specialist II
Author

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

Michael_Tarallo
Employee
Employee

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

Regards,
Mike Tarallo
Qlik
Michael_Tarallo
Employee
Employee

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

Regards,
Mike Tarallo
Qlik