Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

variable that is defined as a formula

Hello,

I am having problems currently using a formula variable in set analysis. This is my first time using a variable that is defined as a formula -- there must be something I'm missing regarding correct syntax.

In my application I have defined:

Variable: vCalculo
Value: Formula
Formula contains something like this: (VBLE1-VBLE2)/VBLE3

When I try this:

1. =Only({<PERIODO = {$(=Max(PERIODO))}>}Aggr(Only(Formula),CodIndicador,PERIODO))

The result is = (VBLE1-VBLE2)/VBLE3

And for this:

2. =Only({<PERIODO = {$(=Max(PERIODO))}>}Aggr(Only($(=vCalculo)),CodIndicador,PERIODO))

The result is = -

Second one only shows results when select an specific row on the simple table. I don´t know what else condition I need to include for the syntax in option 2 if the formula to evaluate (option 1) is recognized for each row.

Any idea?


Thanks.

example.JPG

2 Replies
Not applicable
Author

Hi Olga,

Try this expression :

=Only({<PERIODO = {$(=Max(PERIODO))}>}Aggr(Only($(vCalculo)),CodIndicador,PERIODO))


Hope it helps.

Regards,


Nicolas

Not applicable
Author

Hi Nicolas,

Thanks for your help, unfortunately the behavior is the same. When i have two rows can´t calculate the formula value; but if you select one specific row it works. A parameter seems missing.

Regards,

Olga