Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I'm having a problem with an expression and can't get it right.
I'm trying to select the last cost adjustment record for a selected manufacturing order using
sum({$<TransCode = {'CA'}, [Transaction Timestamp] = {"=max(timestamp#([Transaction Timestamp]))"}>} [Average Cost])
Where CA is the transaction code for cost adjustments there can be only one CA for any given transaction timestamp.
In this example there are two cost adjustments:
The following is the result in a chart which is the sum of the Cost After values. I would have thought that the criteria for Max timestamp would have only returned the last of the transaction set which is 11/09/2011 11:52:02 AM and not the sum of both records.
Hope you can point me in the right direction.
Thanks,
Rich
Try
=FirstSortedValue({<TransCode = {'CA'}>} [Average Cost],-[Transaction Timestamp])
as expression.
Regards,
Stefan
Thank's for sticking in there with me Stefan.
Rich