Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Expression help

Hello QV,

I have below expr in my chart.

sum({<Segment={'Group'}, Status = {'Cancelled'}>}[REV YTD])/1000000

Now my requirement is to exclude Cancelled Accounts, means Status is not equals to 'Cancelled'.

How to write the expr for the same.

Thanks,

Ananth

1 Solution

Accepted Solutions
alexandros17
Partner - Champion III
Partner - Champion III

Try with

sum({<Segment={'Group'}, Status = {'*'}-{'Cancelled'}>}[REV YTD])/1000000


means all minus cancelled

View solution in original post

14 Replies
simondachstr
Luminary Alumni
Luminary Alumni

sum({<Segment={'Group'}, Status -= {'Cancelled'}>}[REV YTD])/1000000


A minus before the = should exclude it

alexandros17
Partner - Champion III
Partner - Champion III

Try with

sum({<Segment={'Group'}, Status = {'*'}-{'Cancelled'}>}[REV YTD])/1000000


means all minus cancelled

Not applicable
Author

Sorry, both are not working...

ashfaq_haseeb
Champion III
Champion III

Hi,

this must work

sum({<Segment={'Group'}, Status -= {'Cancelled'}>}[REV YTD])/1000000


If not post sample data.


Regards

ASHFAQ

Not applicable
Author

I'm getting error, if I write above expr

Expr.png

alexandros17
Partner - Champion III
Partner - Champion III

I'm sure the syntax is correct, explain with more details, why you say it doesn't work?

ashfaq_haseeb
Champion III
Champion III

It gives error but gives you proper result

To avoid that you have been provided second expression

Which does the same

sum({<Segment={'Group'}, Status = {'*'}-{'Cancelled'}>}[REV YTD])/1000000


Regards

ASHFAQ

mr_novice
Creator II
Creator II

The editor dont understand the syntax but it should work...

PrashantSangle

Hi,

Even if there is red line but it will give you correct output.

Check it.

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂