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

Erros in Expression: ')' expected

Hello to all,

I'm facing the following issue in my chart:

Error in expression_3.PNG

I have the following variables that are display in my chart:

Variable A = $(vAA)

Variable B = $(vBB)

When I try to divide then, I tried different forms, with paranteses, without and so on....

Case 1:

A/B = $(vAA) / $(vBB)

Error in expression_2.png

Case 2:

After commenting the 'A/B' field.

Error in expression_1.png

Case 3:

Anything different than case 1.

Error in expression_3.PNG

Any idea on the main reason why it is happening?


Kind regards,

Marco Arruda

6 Replies
sunny_talwar

How are the two variables defined? And you are saying that Case 1 works, but Case 2 and 3 don't?

trdandamudi
Master II
Master II

How are the variables defined ?

swuehl
MVP
MVP

Using case 1, clear the expression label and hover with the mouse over the expression header.

What do you see?

Not applicable
Author

A = sum({$<Year={$(vLast_Year)}>}$(vRevenuePY))/1000

B = sum({$<Year= {$(vCurrent_Year)}>}$(vRevenue))/1000


Variables used in A and B:
vRevenue:

If([$Currency Selector]='EUR', [Revenue EUR],

if([$Currency Selector]='USD', [Revenue USD],

if([$Currency Selector]='CC', [Revenue CC],

if([$Currency Selector]='GBP', [Revenue GBP]))))

vCurrent_Year:
=if( GetSelectedCount(Year)=1,Year, Year(Today()))

vLast_Year:
=$(vCurrent_Year)-1

Case 1
Does not work, because I was expecting a result of (for total): 175.629 / 182.507 = 0.96
What happens is that I have for case 1, that shows only variable A.

Case 3:
When I try to include parentesis or anything like it in my expression.

What I don't understand is why case 1 gives me only variable A instead of the division of variable A / variable B.

Not applicable
Author

I tried to hover over it in the label, definition and the header of the chart (table), but I got nothing.
Am I on the right track?

swuehl
MVP
MVP

Can you post an actual screenshot(s) of your variable definition shown in variable overview?