I have been searching other AGGR questions but cannot 'understand' what the solution needs to be. I have data as below, where there are outstanding values for a customer. the 2 inv id's are 2083 and 2346. The outstanding values are carried forward from 2083 to 2346. I need to show only the most resent inv id with its outstanding value. (Inv 2346)
My closest expression is "sum(Aggr(max([Outstanding]), [Last Payment]))", but it returns 2 rows instead of only the last record.
I really appreciate a explanation about what I am doing wrong, so that I can understand how the aggr works.
Thanks for your reply. Your solution returns only the last record for the whole data set. Probably was not clear from my side. Sorry. I require the outstanding value for each 'Invoiced' company. The example only had Company C as a example but there are many more companies.
To answer your question of what's wrong in your Expression 'sum(Aggr(max([Outstanding]), [Last Payment]))'
Your Requirement is to find out the Outstanding amount for the latest payment , so latest payment =Max(Last Payment) is required in your expression rather than max(outstanding). in your expression you are finding out max of Outstanding for each last payment which will give two records.
you need a expression to find out the max last payment for every client and the equivalent outstanding amount.