FM - How to Solve Problem of Using Unstored Calcs in Another Calc

The Balance Before Payment field (BalBeforePay_cc) is equal to the BalAfterPay field from the prior month.  Thus, I linked the table to itself by YearMonth to YearMonMin1 and then pulled the previous month in.  It worked.  However, for the same current month, when I try to subtract the Mort + MisAdjust fields from BalBeforePay_cc in order to get BalafterPay, the BalAfterPay field shows a ?, presumably because you cannot calc an unstored field.  How would you solve this problem.  Thanks.  See attachment.
Who is Participating?
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.

Will LovingPresidentCommented:
An unstored calculation field can certainly be used within another unstored calculation.  

1. Check to make sure that all the fields referenced are set to have a result as "Number" rather than text.

2. Make sure your display field is large enough to display the result

3. Comment out each part of the calculation and see if it displays the correct value for just that portion.

4. Make sure your relationship is valid from where you want to display the value

5. Make sure the calculation "Evaluate this calculation from the context of…" selection at the top of the calculation dialog is correct.
rvfowler2Author Commented:
Checked all 5 points and yet still when I change one of the fields from BalBeforePay to BalBeforePay_cc, I get the ? no matter how far I widen the field.  See screen print.
Will LovingPresidentCommented:
1. Can you display BalBeforePay and BalBeforePay_cc side by side on the same record?

2. I can't see the calculation for BalBeforePay_cc but I would question whether it is based on a Global Field or Parameter or something that makes it calculate correctly by itself but not In the context of the calculation.

3. If you comment out the BalBeforePay_cc field and just use (Amort + MiscAdjust) does the correct amount for that sum show up?

4. What happens if you comment out (Amort + MiscAdjust) leaving just BalBEforePay_cc?
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

rvfowler2Author Commented:
1.  Yes displayed them side by side on the same record.
2.  Calc not based on global field or parameter.  (see attached)
3&$.  Correct amount shows when commenting out BalBeforePay_cc; however if I comment out (Amort + MiscAdjust) leaving just BalBEforePay_cc, I get a ? in the field.
Will LovingPresidentCommented:
Well, I don't see anything obvious. I'm assuming that the calculation for BALafterPay in the last screen shot is actually incorrect and should reference BalBeforePay_cc rather than BalBeforePay.

It's pretty obvious that there is something about BalBeforePay_cc that is causing the issue because if you comment out (or just remove) the rest, you're just leaving a calculation referencing a calculation and that should always work if the "Calculate from" and the "Result Type" are correct….

So to confirm that, if you remove, not just comment out but remove ( Amort + MiscAdjust ) leaving only BalBeforePay_cc, it shows a question mark? Does it do this on all records? Might you be only looking at the first record that might have invalid data?
rvfowler2Author Commented:
So to confirm that, if you remove, not just comment out but remove ( Amort + MiscAdjust ) leaving only BalBeforePay_cc, it shows a question mark?  -- YES.  No, not invalid data because I'm looking at numerous rows of fields containing data that all become ? marks.

I currently am referencing BalBeforePay, which has static data until I get BalBeforePay_cc working.
Will LovingPresidentCommented:
My guess is that you have something recursive in the calculation. If BalBeforePay_cc references the previous month's BalBeforePay_cc and that references the next previous month's value then you have an infinite recursion that will not calculate properly.

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
rvfowler2Author Commented:
Thanks.  Looking into making it non-recursive with a static auto enter.
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
FileMaker Pro

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.