Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hey all,
I'm having difficulty getting values using FirstSortedValue. I'm trying to retrieve the latest "amount" per record but I am getting null values and I'm not sure why. Here's what my script looks like:
=FirstSortedValue(amount, -date)
I would greatly appreciate the help.
Thanks,
Napac
*EDIT*
I feel I should clarify what I'm looking for. I'm trying to extract the latest total amount per account.
Account Amount Date
1 25 4/30/13
2 432 4/30/13
2 324 4/30/13
2 381 5/1/13
1 89 5/1/13
1 9821 5/1/13
2 423 5/2/13
For instance, I would want to sum the latest amounts for accounts 1 and 2 without bringing in any amounts before the latest date
This works, thank you so much!
Hi Swuehl, I have a similar problem and try to adapt you solution but with not result... may you check this.
The sort weight (second argument to FirstSortedValue() function) needs to be numeric.
So you should create your year-month field AM using a QV date function, not using string operations.
See attached.
Hi Rob,
Your tip about duplicates on sort column helped me and my coleague to solve a customer issue.
Thank you,
Samuel can you please explain that how this works in ?
Hi everyone,
I make this works fine when i'm on the application on my computer, but as soon as i distribute it on the server, it shows random data, like if the firstsortedvalue() doesn't work on ajax.
@
=FirstSortedValue(DISTINCT aggr(count({<[APP STATUS]={'Deployed'},[APP ENVIRONNEMENT]={'Production'},[PERSONROLE]={'Supportedby'}>} DISTINCT [APP ID]),Date),-Date)
Do you have any idea ? I'm getting crazy here
Hi Swuehl, I have a also similar problem for this, but the different i have is IDType, so im trying to use your sample its working but i need to add the ITDType.
=If (IDType= 2,FirstSortedValue( aggr(sum(RATING),HEADERID,CREATEDDATE), -aggr(CREATEDDATE,HEADERID,CREATEDDATE) ),PARTTYPE)
Note: Can you correct me fro this expression.
Thanks Bing