Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Moving Average - Weekdays only

Hello -

 

I am trying to create a moving average for docs sent out.  I have the Moving Average formula worked out, but instead of including every day in my MA, I want to get the MA of only weekdays (Monday-Friday).  How can I do that?  Below is my current MA DAX which includes weekends as well.

 

Thanks!

Ryan

 

 

Moving Average = IF(ISBLANK( [Total Docs Sent] ),
BLANK(),
AVERAGEX(
   DATESINPERIOD(
     Calendar[Date],
   LASTDATE(Calendar[Date] ),
   -'Moving Average What If'[MA Days], DAY ),
   [Total Docs Sent] ) )

2 REPLIES 2
jthomson
Solution Sage
Solution Sage

Make a calculated column in your date table, either using Date.DayOfWeek in the query editor or WEEKDAY in data view and add filter on the relevant values?

Anonymous
Not applicable

Are you referring to adding the filter into my MA formula, if so, how would I implement that filter in?  I have already created my 'Weekday' column into my Calendar table where the weekends (Saturday and Sunday) are days 6 and 7.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.