Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
i have data like this
LOAD * INLINE [
cust no, acc no, bal
1, 1a, 15000
2, 2a, 50000
3, 3a, 20000
4, 4a, 20000
1, 1b, 12000
2, 2b, 5000
5, 5a, 60000
];
i want to count the no of customers who are having bal more than 50000, here i want to group on custno. i want to use in expression level
i have tried this exp but it is not working
=count(aggr(sum(bal)<=50000,[cust no]))
This might also work:
=Sum(Aggr(Count({<[cust no] = {"=Sum(bal) < 50000"}>}[cust no]), [cust no]))
in a textbox, for less then 50000 (replace with >= for ...)
=sum(aggr(if(sum(bal)<50000,1,0), [cust no]))
This might also work:
=Sum(Aggr(Count({<[cust no] = {"=Sum(bal) < 50000"}>}[cust no]), [cust no]))
hi
its working fine.
but i want to make it more globalize here is my exp
sum(aggr(if(sum(bal)>50000,1,0),customernbr))
here i want pass bal and 50000 as parameters in exp so that i want to build set analysis on this exp how to do that.
am i fallowing correct approach or not i am getting doubt please help in this
thanks in advance@
thanks bro
No problem
I am glad it worked for you.
Best,
Sunny
Try this:
=Sum(Aggr(Count({<[cust no] = {"=Sum(bal) < $(vVar)"}>}[cust no]), [cust no]))
Where vVar is set using a inputbox object or slider object or any kind of variable input object
HTH
Best,
Sunny
hi
i am also feeling the same
i want to make it more globalize here is my exp
sum(aggr(if(sum(bal)>50000,1,0),customernbr))
here i want pass bal and 50000 as parameters in exp so that i want to build set analysis on this exp how to do that.
am i fallowing correct approach or not i am getting doubt please help in this
thanks in advance@
hi
here bal is also vary i mean some times it is BalnaceEur,BalanceDoller,LocalCurrunacy like that, that y i want to make it as variable
and also we using it as expression not in text object