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

IF NOT formula

I'm trying to create a pie chart that sums all of a certain amount, exlcuding records for which "Package Config" = "No Package".  The "Package Config" dimension is not used in the pie chart, just Supplier.  The weird thing is: if I apply the formula below to a bar graph that has "Package Config" as one of the dimensions, it works perfectly.

Here is my attempt (not working for pie charts):

=if(not(PACKAGE_CONFIG = 'No Package'),sum(TOTAL_ALLOCATION))

What am I doing wrong?  Can the IF NOT function only be used if the chart includes the dimension that I'm trying to qualify? 

Also: I would love to do this using Set Analysis, but don't know how.

Thanks!

Labels (1)
1 Solution

Accepted Solutions
SunilChauhan
Champion II
Champion II

if((PACKAGE_CONFIG <> 'No Package'),sum(TOTAL_ALLOCATION))

its always better to write sum in starting

sum(if(PACKAGE_CONFIG <> 'No Package',TOTAL_ALLOCATION))

Sunil Chauhan

View solution in original post

2 Replies
Not applicable
Author

Hi...

can you give this a try?^^

Dimension tab:

Supplier (check "Suppress When Value is Null")

Expression tab:

sum({$<PACKAGE_CONFIG -={'No Package'}>} TOTAL_ALLOCATION)

Best Regards,

Alex

SunilChauhan
Champion II
Champion II

if((PACKAGE_CONFIG <> 'No Package'),sum(TOTAL_ALLOCATION))

its always better to write sum in starting

sum(if(PACKAGE_CONFIG <> 'No Package',TOTAL_ALLOCATION))

Sunil Chauhan