Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
cliff_clayman
Creator II
Creator II

Sum expression - only display totals greater than one

I have a simple straight table with 3 values, Name, Vendor and # of Purchases.  I want to exclude from the result set the # of Purchases that equal 1.  How can I do that?

1 Solution

Accepted Solutions
sunny_talwar

May be like this:

If(Sum(Purchases) > 1, Sum(Purchases))

View solution in original post

15 Replies
sunny_talwar

May be like this:

If(Sum(Purchases) > 1, Sum(Purchases))

narendiran
Partner - Creator
Partner - Creator

Hi Cliff,

Not sure is this what you need

if(Sum(# of Purchases)>1,Sum(# of Purchases))

if not please explain bit more.

cliff_clayman
Creator II
Creator II
Author

Sunny answered it correctly.  However, when I add an extra field in for Date, I see null values in the # of Purchases field.  How can I remove those?

sunny_talwar

You mean extra expression?

cliff_clayman
Creator II
Creator II
Author

No, it is just another Dimension.

sunny_talwar

I don't think that should happen. Would you be able to share a screenshot to show the issue?

cliff_clayman
Creator II
Creator II
Author

Actually, that does not appear to be the issue.  When I just did a Sum on the # of Purchases, the data looks fine.  So, it is something with this expression:

If(Sum(Purchases) > 1, Sum(Purchases))

sunny_talwar

What does not appear to be an issue? I am not sure I follow, can you elaborate?

cliff_clayman
Creator II
Creator II
Author

Right now I have added Date to my existing fields and that is not causing any values to be blank.  The root cause of the blank values issue seems to be the expression for # of Purchases.

If(Sum(Purchases) > 1, Sum(Purchases))         Label: [# of Purchases]

When I just do a basic Sum, the data looks fine.  I still need a way to remove the results where # of Purchases = 1.