I want to have a chart/table that shows the total value of each project. Normally it would just be a case of having the name as a dimension and sum(OrderValue) as an expression, but I noticed that there are duplicate OrderIDs as each stage of the order process generates multiple rows.
So, what would be needed to be done is first select all distinct OrderIDs and then sum up the corresponding OrderValues for those rows. I tried using the aggr() function as it seemed the most obvious route, but not with much success.