You don't seem to ask a question in your post, but based on the subject I assume you want to know how to do a conditional sum?
Set analysis limits (or extends) the set of data the formula is working on, so that's not the way to go here. If is the function you want:
This wil check the value of Field A for each record and if it is greater than 0 it will add FieldB to the total sum, else Field C
Hope that answers the question you didn't ask