Is it possible to use the DISTINCT function within the AVERAGEIF function? I need to average the number of days a PO has been on order if a specific purchase group number was used to create the order. The problem is that our data is pulled from SAP, which displays the POs line by line, meaning that there are multiple rows for the same PO. I've been trying to nest DISTINCT into the formula with no luck. My base formula without the DISTINCT function works fine.
=AVERAGEIF({Purchasing Group}, [Column2]1, {# of Days on Order})
But,
=AVERAGEIF(DISTINCT(COLLECT({Purchasing Group}, [Column2]1, {# of Days on Order}))) Returns #INCORRECT ARGUMENT
And
=AVERAGEIF(DISTINCT({Purchasing Group}, [Column2]1, {# of Days on Order})) Returns #UNPARSEABLE
Do I need a helper column to do this?