Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a table with structure
Name Invoicenumber
aaa 123
aaa 123
aaa 123
bbbb 123
i need to display only the name which processed maximum number of invoices in a text object
Thanks in advance
Regards
Try
= FirstSortedValue( aggr(Name,Name) , aggr(-count(Invoicenumber),Name) )
= FirstSortedValue(Name , - max(Count(Invoicenumber) )
but it is saying error in expreession
Try
= FirstSortedValue( aggr(Name,Name) , aggr(-count(Invoicenumber),Name) )
Thanks Swuehl
It worked like charm
Regards
Hi One more Qn.
How to find minimum of average?
= FirstSortedValue( aggr(Name,Name) , aggr(-min(avg(Invoicenumber)),Name) )
Regards
What should the avg(Invoicenumber) return [given your above sample data]? 123?
Hi swuehl
Not for that data I am using some other and data and found the average of time they are utilizing for processing certain invoices .
and now I need to show the member who is having least average response time (i.e) High Productivity.
= FirstSortedValue( aggr(ModBy,ModBy) , aggr(min((-avg(Diff))),ModBy) )
Regards
Then try
= FirstSortedValue( aggr(ModBy,ModBy) , aggr( avg(Diff),ModBy) )
FirstSortedValue() will return the min value sorted by your sort weight avg(Diff), if you want to get the max, add the minus sign.
And if you can have multiple ModBy's with the same min sort weight, FirstSortedValue won't return anything, to get at least one, add a DISTINCT qualifier:
= FirstSortedValue(DISTINCT aggr(ModBy,ModBy), aggr( avg(Diff),ModBy) )