Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have a list of orders like the following :
Order ID | Amount | Currency | Currency Rate | Order Date |
---|---|---|---|---|
I need to show, in a text box, the sum of all Amount in Euro where :
sum of all Amount in Euro =sum of all orders and for every Order: sum(Amount) * the average of Currency Rate of the current Currency.
that means, the average of Currency is calculated based on all other order having the same currency
any idea ?
Regards,
Yacine
Hi,
maybe like this:
sum(Amount)*sum(aggr(avg(Currency_Rate), OrderID, Currency))
regards
Try
AVG(TOTAL <Currency> Currency_Rate)
&
SUM(Amount)*AVG(TOTAL <Currency> Currency_Rate)