Without putting too much effort on code-optimization, maybe you could try something like this:
LOAD ID, LoanType, State, TransDate, TransType, TransAmount
LOAD State, VAAttorneyFeeLimit, FHAAttorneyFeeLimit, PropertyFee
if(TransType = 'PropertyFee',
if(TransAmount > PropertyFee, 'Y', 'N'),
if(LoanType = 'VA',
if(TransAmount > VAAttorneyFeeLimit, 'Y', 'N'),
if(TransAmount > FHAAttorneyFeeLimit, 'Y', 'N')
) AS FlagOverLimit
This isn't too efficient due to the nested if-statements. And if you real case has more TransTypes and LoanTypes, the amount of ifs needed will increase.
I've thought of a more optimized and flexible (in case of more TransTypes and LoanTypes) solution, but it would need a more complex coding... If you need it, let me know.
The way that Qlikview works is pretty much dynamically through "outer join" connections between tables. Tables are connected very simply through field names that are exactly the same.
Literally all you need to do is script the two tables using those exact field names - they only have the state in common - and Qlikview will do the rest. You don't have to do anything to reference the different tables in the objects in the resulting dashboard. just create an object with the Loan type, state, transdate etc and it will do the join automatically.
Is this what you wanted?
Let me know
Could you expand on that a little? If I'm comparing multiple values, can I nest my if statements? Also, what is the syntax for the load? I provided this as an example, but what I'm doing is actually a little more complicated. If someone could provide an example script of how they could do this, then I'm hoping I can expand on that for my report. Thanks!