Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi all,
is it possible to aggregate from a variable?
tried it like this
=FirstSortedValue(PAYMENT_TYPE, -Aggr($(Amount$), PAYMENT_TYPE))
but didn't retrieve..
any ideas?
advanced thanks
Then this should work unless you have duplicates
=FirstSortedValue(PAYMENT_TYPE, -Aggr(Sum(AMOUNT), PAYMENT_TYPE))
or you can do this if you have duplicates and you want to pick one name
=FirstSortedValue(DISTINCT PAYMENT_TYPE, -Aggr(Sum(AMOUNT), PAYMENT_TYPE))
or this if you wish to show all PAYMENT_TYPE separated by commas
=Concat(DISTINCT {<PAYMENT_TYPE = {"=Rank(Sum(AMOUNT)) < 2"}>} PAYMENT_TYPE)
You should be able to. I am guessing that Amount$ is your variable? How do you define it? I mean what is the expression behind it?
hi Sunny, behind it there are two variables divided:
Amount$ = mApproved / mTotalAmount
Hahaha and how are those defined? Can you share a sample maybe?
mApproved :
sum({$<STATUS={'Approved'}>}AMOUNT)
mTotalAmount:
sum(AMOUNT)
So, can you try to check if this is working or not?
=FirstSortedValue(PAYMENT_TYPE, -Aggr(Sum({<STATUS = {'Approved'}>} AMOUNT)/Sum(AMOUNT), PAYMENT_TYPE))
and if that works, then it is the way you have defined your variables that might be causing an issue. It would be faster if you are able to share a sample, if not, then we will slowly troubleshoot this.
hi,
tried it with the expression but it didn't work.
set the expression in a variable 'vTest' it retrieved the value..
vTest in the aggregate again didn't work...
Tried it with expiration? Not sure I understand what you mean?
expression
I don't really know what you have except the expression you have shared. Can you share some information as to what exactly are you trying to do? May be a sample?