Ok, I'm at wits end trying to figure out why this isn't working. Again, I'm just getting started with Webi, and trying to understand context and input and output best I can. But I still for the life of me can't figure out why this simple sum isn't working.
I'll paste some screenshots, and hopefully someone can help me figure this out, cause it's driving me insane. Right now I'm just testing different things in the report to try and duplicate a program we have here that will need to be done in Webi for now on. I'm just trying to do quick data confirmations before I proceed with creating the real report, but keep getting stuck. Right now, similar to yesterday's question, I have a report showing process orders, and each of these have multiple submixings that each contain a certain number of pours (like lines in a recipe, and submixings are different bowls). Some of the submixings can be automated on robots and some done manually. So right now, the report is showing results on a Process Order level, and I have a variable called Pours Remaining that shows me how many total open pours there are for the PO for ONLY automated submixings. Then I have another variable I called AutoPRGreater0, which gives a 1 or a 0 for the PO overall if there are any open automated pours remaining.
Both those variables work fine, as can be seen in the following screenshot. The problem arises when I try and get the sum of all AutoPRGreater0 for the section. Even though the sum if put within the section at the bottom is correct, when I put a cell outside the block it will ONLY display a total of 1. No matter what I put in input or output context, I've tried so many different ways, it still is giving me a total of just 1. It's driving me crazy!
Anyway, please see screenshots. The other cells up top (no headers yet, as again, i'm just experimenting) are totaling other variables which are formatted the same way as AutoPRGreater0, yet they work up top!! I'm using the same formula in the upper cells to give me the sum, yet the two other cells calculate correctly, but the AutoPRGreater0 one (middle one) doesn't, and just shows 1. I have no idea why! I'll paste the formulas for all variables after the ss.
The sum at the end of the report works fine, and appropriate shows 23. This is what I want above!
The AutoPRGreater0 variable is calculating off of the PoursRemaining Variable. Is this somehow recalculating when using the AutoPRGreater0 outside of the block? Is that the issue? What do I do? I'm just at wits end. I've tried everything. I just want that simple sum, the value of 23, outside the block. It is so frustrating how things that seem like they should be so quick and simple for me are taking so long to actually accomplish. So your help will be just tremendously appreciated.
Here is the formula for the PoursRemaining Variable (IDSM is the submixing, though not on the report in order to group by PO Level):
PoursRemaining: =Sum(If ([Type Post] = "A" And [Status (PO)] InList ("02";"03";"35";"44") ; ([Number of Pours] - [Number of Pours Done]) ; 0) ForEach ([IDSM]) )
The AutoPRGreater0 is simply the formula of :=If([PoursRemaining] > 0;1;0). Both these work fine in the block, as can be seen.
I simply want the sum of the AutoPRGreater0 for all the PO's. It keeps only giving me a value of 1.
The formula for the sum cell is :=Sum([AutoPRGreater0] ForEach ([Process Order]) ) In Section
But I've tried so many other ways, other contexts, other inputs and outputs as well. If a value is shown, it is always 1.
Can anyone understand the issue I'm hoping? Anyone know how to just get it to show the correct sum of 23??
The other cells calculate fine, for example the top left cell formula is :=Sum([PickReqCount] ForEach ([Process Order]) In Section )
PickReqCount variable is: =If([PoddStatus] = "Pick Request";1;0)
So that variable is similar to the AutoPRGreater0 one, and the formula in the upper cell is identical. Yet it calculates fine and the other gives just 1. I'm beyond confused, and have read so many links, tried so many things, and I keep getting 1... I wanna scream at this point. Thank you for any help you can give, and as always I appreciate everyone's patience with my long winded posts! ( I just try to be thorough)