Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello.
I´m properly using this expresion on my app:
Aggr(sum(importe)-(15*max(clientes,mes_alta)),mes_alta)/sum(aggr(Max(clientes),mes_alta))
Now, I need counting how many of that values are less tan 0
I´ve tried this:
=count({<Aggr(sum(importe)-(15*max(clientes,mes_alta)),mes_alta)/sum(aggr(Max(clientes),mes_alta))={'<0'}>})
but returns "error in set modifier".
Can help me?Hi
Try like below
Sum(Aggr(If(Aggr(sum(importe)-(15*max(clientes,mes_alta)),mes_alta)/sum(aggr(Max(clientes),mes_alta))< 0, 1), mes_alta))
if(
Aggr(
(sum(importe)-(15*max(clientes)))
/
(Max(clientes))
,mes_alta) > 0
,
Aggr(
(sum(importe)-(15*max(clientes)))
/
(Max(clientes))
,mes_alta)
)
Hey @JVET, I agree with @vinieme12's approach in this case as Set Analysis may not be the best option for this kind of calculation.
Hello @vinieme12 , thanks by your response. Your idea has not error, but doesn´t give me the result I need. When I calculate this:
Aggr(sum(importe)-(15*max(clientes,mes_alta)),mes_alta)/sum(aggr(Max(clientes),mes_alta))
I need to count in a different frame, how many of that values are negative.
Thanks.
Hi
Try like below
Sum(Aggr(If(Aggr(sum(importe)-(15*max(clientes,mes_alta)),mes_alta)/sum(aggr(Max(clientes),mes_alta))< 0, 1), mes_alta))
Can you please inform the reason for doing aggr() function in all places.
importe, clientes, mes_alta are coming from same table? or different table?
This works fine. Than you so much!!!