Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Exclude zero and negative values

How to Exclude zero and negative values in the Expression

imggo.PNG

1 Solution

Accepted Solutions
PrashantSangle

In expression try like

if(USD>0,Sum(USD))

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 🙂

View solution in original post

9 Replies
PrashantSangle

In expression try like

if(USD>0,Sum(USD))

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 🙂
neha_shirsath
Specialist
Specialist

You can create flag in script like-

if(isnull(USD) or USD<0,1,0) as flag

ANd use this flah in your expression like-

sum({<Flag= {0}>}USD)

vishalmanu
Partner - Creator
Partner - Creator

HI,


You can write a simple if condition in your expression as below


if(USD>0,Sum(USD))

Anonymous
Not applicable
Author

Can some one help me, result should be like this in the screenshot, attached source for your reference.

img123.PNG

Anil_Babu_Samineni

Perhaps this? I didn't test due to there is no S/W in my machine

Sum({<[Cus ID] = {"=Sum(USD)>0"}>} USD)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
PrashantSangle

did you try any of the above solution?

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 🙂
neha_shirsath
Specialist
Specialist

Find the attached file.

vishalmanu
Partner - Creator
Partner - Creator

Hi,

You can try using the expression that i have posted above. its working and i am able to get the result as per the screenshot posted by you. Or you can try using the expression posted by Anil Babu. Both the expressions will give you the same output.

Anonymous
Not applicable
Author

Thanks, the below one is working in background expression

if(USD>0,USD) as Flag