6 Replies Latest reply: Apr 3, 2018 10:17 AM by Pascal Dijkshoorn RSS

    Aggr Function

    Pascal Dijkshoorn

      Hi Guys,


      I am struggling with an aggr function. I think in theory the formula i use should be right but somehow it does not work. I am calculating the driven kilometers of trucks with the following formula: Max (Mileage) - Min (Mileage), and this works fine. Every truck is linked to a department. Now i want to make a pivottable with department as a dimension and a certain timefield (date/week/month etc.) as a dimension.


      The measure should calculate for every truck separately the driven kilometers and then calculate the average of all trucks per department. I tried to use this formula but it doesn't work:


      avg (aggr ((Max (MILEAGE)-Min (MILEAGE)),ASSET_NR_LINKED))


      Whereby ASSET_NR_LINKED is the dimension for the different trucks.


      Anyone who can help me?