And the issue is not the value for the production, it's that there are no entries for some of the wells. Looks like it may involve ISNULL somehow but I'm uncertain at this point and would appreciate some insight.
Have you tried the following:
When you have the ZNs next to the field rather than wrapping the aggregation, we are only going to apply the ZN logic to each row of the dataset. Then, Tableau will try and compute the ratio. Due to the zn being where you had it, it was likely causing some of the denominators to be 0s. This will cause Tableau to return NULL as the value for the ratio.
Wrapping the whole ratio in ZN will allow us to check whether the ratio itself is null. If the ratio returns a Null (due to a missing or 0 denominator) we will catch this with ZN and turn it into zero. In this case, it will not be greater than 0 so we will return zn(sum(Oil)).
Hope this helps,