Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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?
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.
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
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!
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
Miguel,
Here is an example of what is happening, see if you can help me.
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.
Miguel,
It worked!
Thank you!