Forum Discussion
Paul_Cracknell
Jul 06, 2022Copper Contributor
Avg Sales Per Week Day using DAX
Hi, all. I have a dimension table that is a standard date dimension table - has all the usual elements (date, day of week, week number, month number, etc). I also have a fact table with sales for...
Paul_Cracknell
Jul 06, 2022Copper Contributor
@Sergei, Thank you. This is giving me the average of each order on those week days. I am looking for the average of the total quantity for each of those weekdays. That's why I tried AVERAGEX because it would sum the quantity for each weekday first, then run the average for each weekday.
- SergeiBaklanJul 07, 2022Diamond Contributor
If I understood your logic correctly that could be
Total Qty:=SUM( Table1[QTY] ) Another Average:=AVERAGEX( 'Calendar', Table1[Total Qty] )
Another way is
Distinct Dates:=DISTINCTCOUNT( Table1[Date] ) Same Average:=DIVIDE( [Total Qty], [Distinct Dates], 0 )