This expression works fine and I get the result I want.
I am now trying to put some IF statement on top of this, since I want this expression to be 'calculated' only in a case where two fields from two different tables are the same. Fields names are 'PRICE_ID' and 'PRICE_ID_PRODUCT'. So I am trying with next expression:
Sabrina, did Sunny's post get you a working solution? If so, do not forget to return to the post and use the Accept as Solution button on his answer post to mark it as the solution, as this will give him credit for the help, and it will confirm to other Community members that it did work.
The only thing I have for you are the following links that may be helpful:
There are some other AGGR related posts in the Design Blog area too, below is the base URL for the area if you want to do some further searching on your own, but I figured the above was along the right lines of what you were trying to do...