Forum Discussion
Paul_Cracknell
Jun 03, 2022Copper Contributor
Average Quantity Shipped by Day of Week
Hi, all. I am having a difficult time figuring out how to correctly formulate DAX so I get average quantity shipped per day of week. I am using AVERAGEX(fShipments, [Total Qty]) but I am generati...
Riny_van_Eekelen
Jun 06, 2022Platinum Contributor
Let's say you have one day of sales with a total quantity of 17000, with 100 transactions that day. Your measure takes 17000 / 100 = 170. What you want is the Total Qty of 17000 divided by the number of days 1 = 17000.
The measure, thus, should be something like:
=SUM([Qty])/DISTINCTCOUNT([Date])
Now, DAX is a bit outside my comfort zone, so there may be a better way to do this.