Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Variables Display Garbage After - QB Advanced Reporting

‌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:

IMG_0605.PNG

13 Replies
sunny_talwar

Why is your expression initiating with *,? I think if you replace *, with just =, the expression should ideally report no error

Not applicable
Author

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]

marcus_sommer

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

ramasaisaksoft

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.

Anonymous
Not applicable
Author

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

Not applicable
Author

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

Anonymous
Not applicable
Author

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

Not applicable
Author

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:2017-01-02_10-02-01.png

Anonymous
Not applicable
Author

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