I have the following fields:
ITEM_NO,
CUSTOMER_NO,
QUANTITY_SHIPPED,
and SHIP_DATE.
I am attempting to create a measure that will show allow me to calculate the average and standard deviation of the number of days between the ship date and the previous ship date. The problems I have faced are as follows: When filtered by ITEM_NO and CUSTOMER_NO, the SHIP_DATE are irregular. i.e. the last most recent date could be 7/18/2019 and the second most recent could be 6/11/2019. Thus, I would want the difference between these dates to be 37. I was able to create a measure named DAYS_UNTIL_NEXT_SHIPMENT that is ABOVE(TOTAL(SHIP_DATE))- SHIP_DATE which works very well. However, I am not able to take the average and standard deviation of this measure to put into a different table.
Any feedback would be greatly appreciated.