I have a database made of:
column A - currency
column B - amount
column C - duration
I need to calculate average duration for each currency.
DSUM(database;"amount";criteria) to get the total amount denominated in EUR
If I would have only one currency I can easily get the average duration by sumproduct(b:b;c:c) and then divide the result of sumproduct by the result of dsum.
The issue is that I have many currencies, therefore I need a sumproduct which multiplies only values which have the same criteria as the dsum formula.
Is there a way to do it?