Qlik Community

QlikView Deployment

Discussion Board for collaboration related to QlikView Deployment.

Not applicable

variable and set analysis

HI all

I've a problem with variable and set analysis.

I've this expression : =sum( {$<ANNO = {$(=Only(ANNO))}>} EMESSO_P_GI )

because I have to use it in many analyzes, I would put the set analalysis formula in a variable then i created a variable

V_var=sum( {$<ANNO = {$(=Only(ANNO))}>} EMESSO_P_GI )

and then i used it in a colum table but it did not work.

the question is: is it possible  put in a variable  a whole set analysis expression??

thanks for your help

1 Solution

Accepted Solutions
Not applicable

Re: variable and set analysis

the soluions was:

var.JPG

I was wrong variable's syntax


thanks for help


ciao

5 Replies

Re: variable and set analysis

Couple of questions:

  1. When you use the expression in a straight table does it give you your desired output?
  2. Are you using V_var as the expression or $(V_var)? Try using $(V_var), if you are not.

the question is: is it possible  put in a variable  a whole set analysis expression??

To answer the above question -> Yes you can save a whole set analysis expression in a variable.

MVP
MVP

Re: variable and set analysis

It seems that you put the whole expression into a variable, not only the set analysis part.

You should be able to do both, but you may need to take care of the way you defined your variable:

The Magic of Variables

MVP
MVP

Re: variable and set analysis

yes it's possible

see attachment

Not applicable

Re: variable and set analysis

thanks for your help.

i tried  to use $var but it did not work. this is the new outcome:

V_EMESSO_P_GI is =sum( {$<ANNO = {$(=Only(ANNO))}>} EMESSO_P_GI )

  

AREA20152014208390661,80896
italy829,20142,9660
england3,382,02841,259,5230
austria28,22587,0620
germany93,3761,861,0270
=sum( {$<ANNO = {$(=Only(ANNO))}>} EMESSO_P_GI )=sum( {$<ANNO = {$(=Only(ANNO-1))}>} EMESSO_P_GI )$(V_EMESSO_P_GI)

var.JPG

maybe it could be a var  scope issue, it seems that the Variable does not recognize the dimension level (Area).

i really appreciate your help

ciao

Not applicable

Re: variable and set analysis

the soluions was:

var.JPG

I was wrong variable's syntax


thanks for help


ciao

Community Browser