Introducing the all-new TIBCO Community site!

For current users, please click "Sign In" to reset your password and access the enhanced features. If you're a first-time visitor, we extend a warm welcome—click "Sign Up" to become a part of the TIBCO Community!

If you're seeking alternative community sites, explore ibi, Jaspersoft, and Spotfire.

Jump to content

average values of a column ignoring zeros


Recommended Posts

Hi,

I am trying to get averages of multiple columns and the issue is when i apply avg["seclected column"] its using the 0's( i have replaced missing values with 0). I dont want this to effect my averages. How can i ignore those while i calucate my averages. I tried to use the below expression

avg(if(["selected column"] !=0)) but this does not work.

Can you please provide some suggestions on this

Link to comment
Share on other sites

Try

Avg(If([value]=0,NULL,[value]))

when you set it to NULL the Avg ignores it (so you are effectively temporarily undoing your imputation)

The if function works as

if(expression, value if true, value if false)

you can see the help when you select the function in the calculated column editor.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...