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

Error variable

Amigos,

Estou com um problema na criação de uma variavél.

Vamos lá...

Conforme a figura em anexo, quando utilizo no meu gráfico a variável ele simplismente esta totalizando o valor para todos.

Ton_Vol_Atual = SUM(IF(ANO_EMISSAO = V_Maior_Ano,D1_QUANT))

O Que esta errado?

1 Solution

Accepted Solutions
Miguel_Angel_Baeyens

Hi Robertta,

Check the ammended file. Note the changes in the Variable Overview dialog. I've changed the expression to use set analysis instead of the If() conditional.

Is that what you were looking for?

Miguel

EDIT: Of course, it will work without the set analysis. The issue was in the other variable V_Maior_Ano, that needed to be expanded since it stores a function that has to be evaluated instead of a numeric value:

SUM(IF(ANO_EMISSAO = $(V_Maior_Ano), D1_QUANT))

Note that I also removed the "=" sign at the left. As far as performance is concerned, the set analysis will do faster than this one.

View solution in original post

6 Replies
Miguel_Angel_Baeyens

Hi,

Try adding a "=" sign at the begninning in the Settings menu, Variable Overview, Description. It will also depend on how are you using the variable $(=Ton_Vol_Atual) or $(Ton_Vol_Atual)

Hope that helps.

Miguel

Not applicable
Author

Miguel,


As attached image: Using $ (= Ton_Vol_Atual) or $ (Ton_Vol_Atual) have the value "-".


I've tried everything, if you have any idea help me, please!

Miguel_Angel_Baeyens

Hi,

I'd use set analysis in the expression that is stored into the variable anyway. Is it possible to upload a very small sample of the application so we can check more comfortably? Just the chart and some data will be ok.

Regards,

Miguel

Not applicable
Author

Miguel,


Here is an example of what is happening, see if you can help me.

Miguel_Angel_Baeyens

Hi Robertta,

Check the ammended file. Note the changes in the Variable Overview dialog. I've changed the expression to use set analysis instead of the If() conditional.

Is that what you were looking for?

Miguel

EDIT: Of course, it will work without the set analysis. The issue was in the other variable V_Maior_Ano, that needed to be expanded since it stores a function that has to be evaluated instead of a numeric value:

SUM(IF(ANO_EMISSAO = $(V_Maior_Ano), D1_QUANT))

Note that I also removed the "=" sign at the left. As far as performance is concerned, the set analysis will do faster than this one.

Not applicable
Author

Miguel,


It worked!

Thank you!