Announcements
cancel
Showing results for
Did you mean:
Creator

## Getting rid of rows if their value is zero

I have this formula for one of the column for my table: Aggr(Sum(Col1), [Col2])

I want to get rid of rows if their value is zero.

I tried using if and <> like this: If (Aggr(Sum(Col1), [Col2]) <> 0, Aggr(Sum(Col1), [Col2]))

And then I unchecked "include zero values" in Data Handling. Even though I was able to get rid of some rows, I am still having -0 and 0 in the table.

When I use this  If (Aggr(Sum(Col1), [Col2]) < 0, Aggr(Sum(Col1), [Col2])) , I get -0 in the table.

Is there a way to get rid of them?
Thank you!

Labels (1)
• ### Qlik Sense

1 Solution

Accepted Solutions
Specialist II

Is Col2 (your measure) a decimal?  Seems to be that's how you are getting -0 to display values are (-.5:0).

If so how about rounding first If (round(Aggr(Sum(Col1), [Col2]),1) <> 0, Aggr(Sum(Col1), [Col2]))

2 Replies
Specialist II

Is Col2 (your measure) a decimal?  Seems to be that's how you are getting -0 to display values are (-.5:0).

If so how about rounding first If (round(Aggr(Sum(Col1), [Col2]),1) <> 0, Aggr(Sum(Col1), [Col2]))

Creator
Author

Thank you. I didn't know that I was getting -0 because of decimal value of my Col1.

I used the round function like this:  If (Aggr(Sum(Col1), [Col2]) <> 0, Round(Aggr(Sum(Col1), [Col2])))