Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a straight table in my application.
It has a dimention = Position
It has an expression which is defined by a variable = $(Reach)
My task is to calculate the maximal Reach in this straight table.
I try to calculate it in a separate text box.
So, I'm trying the following expression:
=max(aggr($(Reach), Position))
But it doesn't work. The result is incorrect.
Could you advise how I can calculate the maximal Reach?
Thank you in advance,
Larisa
Hi,
you should add Aggr function in your variable directly:
aggr( your_expression, Position)
Then, in the text object: =max($(Reach))
Elena
What is the expression that you are using for your variable??
Your first attempt with the aggr function looks OK.
Some more info would be useful though!
Hi,
you should add Aggr function in your variable directly:
aggr( your_expression, Position)
Then, in the text object: =max($(Reach))
Elena
what kind of information does you variable has ?
have tried with the max($(Reach)), aggr has a performance toll so if you can avoid using it
If I do this, I get different results:
Reach1 = aggr(my_expression, Position)
Reach2 = my_expression
Reach1 doesn't equal Reach2.
My expression is like this:
(sum({<[Пол/Возраст] = p([ца_Пол/Возраст]), Доход = p(ца_Доход), Занятость = p(ца_Занятость),
Образование = p(ца_Образование), [Социальный статус] = p([ца_Социальный статус]),
[Население города] = p([ца_Население города])>}
weight*DaysQty)/$(vPeriod))
My expression is like this:
(sum({<[Пол/Возраст] = p([ца_Пол/Возраст]), Доход = p(ца_Доход), Занятость = p(ца_Занятость),
Образование = p(ца_Образование), [Социальный статус] = p([ца_Социальный статус]),
[Население города] = p([ца_Население города])>}
weight*DaysQty)/$(vPeriod))
If I try =max($(Reach)) either directly in a straight table or in a separate text box, I get -.
It isn't calculated.
I tryed with an expression that doesn't contain a variable (while there is one in yours) and it works...
I think, even in vPeriod you have to insert the aggr...
Your original attempt looks correct, I tried with the "sample" script, attached.
Do you get any result in a text box that contains just
$(Reach)
?