Hiii! I need to sum all my costs (shown on the table), for the orders is only a sum but for the clients I have the costs repeated for each order so I need to do a MAX or an AVG first and then sum the costs for each seller. In my example is (5 + 2 + 9).
In SQL is something like this
select
AVG(AvgQuantity) “AvgofAverages”
from (
select
Client,
AVG(Quantity) “AvgQuantity”
group by Client
) X
I’m trying to do something like this but it doesn’t work:
sum({order_costs}) +
sum(avgOver({clients_costs}, [{clients}], PRE_AGG))
I also tried double agreggation but I get the Nested aggregation error.
Please please Help!!!