How to reference an empty cell in Excel Pivot Table calculated field.

I have  a calculated field and  I am attempting to return a blank value if the source field (RateYOY) is blank.  Even after adding a branch at the beginning to look for an empty string, the calculated field returns 1 when the source is blank.
=IF(RateYOY ="","",IF(RateYOY>=0.08,5,IF(RateYOY>=0.06,4,IF(RateYOY>=0.04,3,IF(RateYOY>=0.03,2,IF(RateYOY>=0,1))))))

I need to return a blank so that that row is ignored for my subtotal (average) calculation.
TforTxAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Saurabh Singh TeotiaCommented:
Ideally it should give you blank if your values are blank but they are not blank and have a space in it...You can use this...

=IF(trim(RateYOY) ="","",IF(RateYOY>=0.08,5,IF(RateYOY>=0.06,4,IF(RateYOY>=0.04,3,IF(RateYOY>=0.03,2,IF(RateYOY>=0,1))))))

Saurabh...
Rory ArchibaldCommented:
A calculated field works on SUMs of the field, and your SUM will be 0, not "".

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
TforTxAuthor Commented:
That seems to be the case, I rewrote as this:
=IF(ContractRate>=0.08,5,IF(ContractRate>=0.06,4,IF(ContractRate>=0.04,3,IF(ContractRate>=0.03,2,IF(ContractRate>0,1,IF(ContractRate=0,""))))))  and it returning blank, so I am going to mark as solved.  The underlying issue I was trying to correct was an unexpected subtotal.  For example, I get values of 1, 4, 4, blank, blank, blank.  My row total (I have set as average) returns 5.  I expect the average of the non-blank values, which is 3.
TforTxAuthor Commented:
Sorry, column total, not row.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.