Group Area Code Area Amount
PL A Income 50
PL B Expense -15
PL C Other xxx
I want to create a sub-total after the Expense row and create a formula that adds Income to Expense to give me a Net Amount.
I’ve created a variable similar to
Amount where (<Group>="PL" and <Area> = "Expense") +
Amount where (<Group>="PL" and <Area> = "Income").
I’ve then created a value based break on Area for Expense, so that I get an extra line after Expense, into which I can place my variable.
However when I place the variable into the footer, I only get the value for Expense. If I use it elsewhere in the report (e.g. in the Group footer), I get the correct answer.
I assume it’s something to do the Income figure being outside of the context of my value-based break, but I’m not sure how to rectify it.
OK so I see your ploy. Leave it for a while and you’ll figure it out yourself.
It was indeed the conteyt that was causing the problem. I copied the formula that I had created with the specific context and could see that the output context included AREA. And because I had placed the formula in the footer of the AREA break, it could only see that AREA. Once I removed AREA from the output context, it worked a dream.
Well, it’s not always the case, but it can happen. As Andreas alluded to, thanks for coming back and posting your solution. It will hopefully help the next person with the same or similar question.
Here’s your reward… have a couple of cookies on me.