Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
su_pyae
Creator
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)
1 Solution

Accepted Solutions
stevejoyce
Specialist II
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]))

View solution in original post

2 Replies
stevejoyce
Specialist II
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]))

su_pyae
Creator
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])))