Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
When I go to Ctrl-Alt-V, almost all the installed variables have "Garbage after". I do not see any errors. Here is a photo:
Why is your expression initiating with *,? I think if you replace *, with just =, the expression should ideally report no error
It's looking better! But now I get Garbage after expression "as":
if( ([Classified Account Type] = 'Income' or [Classified Account Type] = 'Liability' or [Classified Account Type] = 'Equity') and [Debit Or Credit] = 'Credit',Amount,
if( ([Classified Account Type] = 'Asset' or [Classified Account Type] = 'Expense') and [Debit Or Credit] = 'Debit', Amount,
if( ([Classified Account Type] = 'Income' or [Classified Account Type] = 'Liability' or [Classified Account Type] = 'Equity') and [Debit Or Credit] = 'Debit',-Amount,
if(([Classified Account Type] = 'Asset' or [Classified Account Type] = 'Expense') and [Debit Or Credit] = 'Credit', -Amount)))) as [Amount With Sign], if( ([Classified Account Type] = 'Income' or [Classified Account Type] = 'Liability' or [Classified Account Type] = 'Equity') and [Debit Or Credit] = 'Credit',Quantity,
if( ([Classified Account Type] = 'Asset' or [Classified Account Type] = 'Expense') and [Debit Or Credit] = 'Debit', Quantity,
if( ([Classified Account Type] = 'Income' or [Classified Account Type] = 'Liability' or [Classified Account Type] = 'Equity') and [Debit Or Credit] = 'Debit',-Quantity,
if(([Classified Account Type] = 'Asset' or [Classified Account Type] = 'Expense') and [Debit Or Credit] = 'Credit', -Quantity)))) as [Quantity With Sign]
In this window you specified only the variable-content without a name-alias and the variables gets those name which you had specified within the step before as you created the variable. Beside them it looked like a script-expression and not like a real variable ... here you will find many useful information about Variables.
- Marcus
case 1:- can you place = symbol in front of IF condition
if we wrongly understood please copy paste the entire code so that we will help to you.
I see "as" in the expression, I think maybe you copied the expression from a script for the dash, "as" is used in the script to define/rename a field, "as" can not be used in the expression in the "expression" tab in the chart properties. If you want to be used in the expression tab, then pls change the expression as below:
1. delete : as [Amount With Sign]
2. change : as [Quantity With Sign] to ")"
Zhihong
I see you wrote "if( ([Classified Account Type] = 'Income' " in the top line and used it in other lines too.
I think you should delete one of the first two "(" and the space used between both brackets.
Hope this will work
Ivo
Hi, Ivo,
I think the logical of the expression is correct, if see more of the if condition, it is:
if ( ( [Classified Account Type] = 'Income' OR condition1) AND condition2,
if(...),
if ( ( [Classified Account Type] = 'Income' OR condition3) AND condition4 , ..., ... )
So both of the 2 points you mentioned should not be the reasons that the expression fails.
Zhihong
I am so close I can feel it!!! I cleaned it up a tad. I am so thankful for your assistance. This is the newest rendition:
The red curly line basically means that the problem started, and it does not validate the rest expression. You can see only the first "if" is blue and all the rest "if" are not blue yet, which means they are not validated.
From the syntax error, it seems you do not have the field "Classified Account Type" , I guess that field name maybe comes from a re-name of some other field in the load script where you copied from. So you need to find what is exact is the field from the raw table, or you must rename is in your load script.
BTW, the 5th "if" should have the same indent as the 2nd "if", because the are 2 results from the 1st "if".
Zhihong