Function Problems

Calculate Average Sales by Weekday with DAX in Power BI or Excel

Tauseeq MagsiTauseeq Magsi Dec 2, 2026 869 views

Question details

Calculate the average daily sales or quantity for each day of the week using DAX.

Calculate Average Sales by Weekday with DAX in Power BI or Excel
Product
Power BI or Microsoft Excel Power Pivot
Device & OS
not provided
Scenario
A fact table contains sales or quantities, and a related date dimension supplies weekday labels for a report.
Observed behavior
The desired report shows the average of daily totals for each weekday, rather than the average of individual orders.
Before you start

Confirm that dCalendar has one row per date and a weekday column, and that its date column has an active relationship to the fact table's date column. If the fact table stores timestamps, use a date-only column for the relationship.

Solution 1Recommended

Average daily totals for each weekday

Use this measure when you want, for example, the average total quantity across the Mondays in the selected period.

AVERAGEX iterates over individual calendar dates. The weekday displayed in the visual filters those dates, and the total measure sums the quantity for each date before the average is calculated.

1
Check the date relationship

In Power BI Model view or Excel Power Pivot's Diagram View, verify that dCalendar[Date] has an active one-to-many relationship to Table1[Date].

2
Create a total measure

In Power BI, select New measure and enter Total Qty = SUM(Table1[QTY]). In Excel Power Pivot, create a measure named Total Qty with the formula =SUM(Table1[QTY]).

3
Create the daily average measure

Select New measure and enter Average Daily Qty = AVERAGEX(VALUES(dCalendar[Date]), [Total Qty]). In Excel's measure dialog, use Average Daily Qty as the name and =AVERAGEX(VALUES(dCalendar[Date]), [Total Qty]) as the formula.

4
Add weekday labels to the report

Add dCalendar[Day of Week] and Average Daily Qty to a Power BI table visual or an Excel PivotTable. Add a date filter to choose the period to average.

Average daily totals for each weekday
Dates without sales: AVERAGEX skips dates where Total Qty is blank. To count those dates as zero, use =AVERAGEX(VALUES(dCalendar[Date]), COALESCE([Total Qty], 0)) and filter the report to the intended date range.
Free Microsoft Office alternative

Explore weekday sales data in WPS Spreadsheet

WPS Office is a free, lightweight alternative with a familiar spreadsheet interface. Open compatible Excel files and explore sales data with spreadsheet tools; WPS does not fix or replace a Power BI or Excel Power Pivot DAX measure.

Explore sales and quantity data by weekday with spreadsheet tools.Open and edit Microsoft Excel XLSX files for easier migration.Work in a familiar, easy-to-use spreadsheet interface.Use a free, lightweight office suite.
microsoft office alternative - wps office

Frequently Asked Questions

Why not use AVERAGE(Table1[QTY])?

AVERAGE(Table1[QTY]) averages individual fact-table rows. To average daily totals instead, use AVERAGEX over VALUES(dCalendar[Date]) with a total quantity measure.

What does AVERAGEX over Day of Week calculate?

AVERAGEX(VALUES(dCalendar[Day of Week]), [Total Qty]) averages the totals for the weekday categories in the current filter context. It does not average the individual daily totals for each weekday.

How can I calculate average sales instead of quantity?

Create Total Sales = SUM(Table1[Sales]) using your sales amount column, then create Average Daily Sales = AVERAGEX(VALUES(dCalendar[Date]), [Total Sales]). Add the weekday column and the new measure to your visual.

Why are weekdays with no transactions missing from the average?

Dates where the total measure returns blank are skipped by AVERAGEX. Use COALESCE([Total Qty], 0) inside the iterator to include them as zero, and filter the calendar to the period you want to analyze.