Use of [THIS] and [PREV]

Generic selectors
Exact matches only
Search title only
Search in content
Search in all posts
Search in pages
Answers
Questions
Solved3.61K viewsFormulas and Functions
0

I’m doing a model for a school, which starts its fiscal year in July. So, I’m at Month 2 (August), and I want the Opening Balance to be equal to the closing balance of the previous month. I’ve tried this:

Opening Balance = Closing Balance[PREV], skip July

And this:

Month2:Opening Balance = Closing Balance[PREV]

I also tried eliminating the Opening Balance and just doing it this way:

Closing Balance[THIS] = Closing Balance[PREV] + Income – (‘One-Time Costs’ + Employee + Expenses), skip July

None of these worked. I kept getting “Recurrance keywords can only be applied to Categories or Groups.”

This works:

Month2:Opening Balance=July:Closing Balance

. . . but it doesn’t then repeat when I copy the month

What am I doing wrong?

Selected answer as best
1

Hello TPB – Thanks for posting your question.

If I write it out your formula in words, it sounds like you are trying say that the PREVious months closing balance equals THIS months opening balance.

You want to use the THIS and PREV recursion formula statements for your Month category, and then call the items after the ‘:’, so you formula should be something like this:

Month[THIS]:Opening Balance = Month[PREV]:Closing balance

‘Month’ being the name of the category that contains the month items.

Hope this helps!

-Mike

Selected answer as best
1

That worked!

Final forumla:

Month[THIS]:Opening Balance = Month[PREV]:Closing Balance

Unselected an answer