Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Ignoring null values in sum

    I have a variable of "totalamountraised" that i would like to find the mean for. Some observations have the value 0 so I would like to ignore them in the calculation, but without dropping them from the dataset. How can I do?

  • #2
    Can you provide a sample dataset using -dataex- and describe what you want with a reference to this dataset?

    In particular do you want to do this by groups?

    If you want an overall calculation the following should work:

    Code:
    summ totalamountraised if totalamountraised!=0

    Comment


    • #3
      Thank you that is what I was looking for!

      Comment

      Working...
      X