I am trying to write an expression statement that is taking 2 machines production rate minus there goal. The problem is that when one of the machines is off, its production rate is 0, which skews the numbers. This is my current statement:

{[default]E289/E289/Analytics/Current/Shift Production at Current}+{[default]E293/E293/Analytics/Current/Shift Production at Current})-({[default]E231/E231/Analytics/Current/Shift Goal at Current}+{[default]E233/E233/Analytics/Current/Shift Goal at Current}

Is there some way that I could exclude a machines "Shift Goal at Current" number if the "Shift Production at Current" number is 0?

Your post mentions two machines but your post seems to reference four machines, E231, E233, E289 and E293. Also you are missing the opening and closing ( ). Anyway, the full expression would be something like:

if(
{[default]E289/E289/Analytics/Current/Shift Production at Current} > 0,
{[default]E289/E289/Analytics/Current/Shift Production at Current}
+ {[default]E231/E231/Analytics/Current/Shift Goal at Current},
0
)
+
if(
{[default]E293/E293/Analytics/Current/Shift Production at Current} > 0,
{[default]E293/E293/Analytics/Current/Shift Production at Current}
- [default]E233/E233/Analytics/Current/Shift Goal at Current},
0
)

Tips:

Expressions generally ignore linebreaks, tabs and additional spaces so you can wrap your expressions as I have shown for readability.

Add a space each side of the mathematical operators to let some air into your expressions (and equations in scripts). It makes them easier to read.