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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
1001
Resolver II
Resolver II

A DAX Calculation Question

Hi All, I have a column of values (production forecast) and a date table with the column, Week Begining applied to the filters Pane.

 

I've filtered out any zero values and have Average Forecast = AVERAGE(Budget [Forecast]).

 

With the Week Begining column applied to the filters pane on the Report page. Would the DAX be calculationg the average daily volume, or weekly volume per the filter applied?

 

Ideally, I'm looking the average weekly volume.

 

Thanks All.   

 

 

1 ACCEPTED SOLUTION
amustafa
Super User
Super User

You can try these 2 new measures

Total Forecast by Week = CALCULATE(SUM(Budget[Forecast]), ALLEXCEPT(Budget, Date[Week Beginning]))

Average Weekly Volume = AVERAGEX(VALUES(Date[Week Beginning]), [Total Forecast by Week])





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @1001 ,

Did the above suggestions help with your scenario? if that is the case, you can consider Kudo or Accept the helpful suggestions to help others who faced similar requirements.

If these also don't help, please share more detailed information and description to help us clarify your scenario to test.

How to Get Your Question Answered Quickly 

Regards,

Xiaoxin Sheng

amustafa
Super User
Super User

You can try these 2 new measures

Total Forecast by Week = CALCULATE(SUM(Budget[Forecast]), ALLEXCEPT(Budget, Date[Week Beginning]))

Average Weekly Volume = AVERAGEX(VALUES(Date[Week Beginning]), [Total Forecast by Week])





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




amustafa
Super User
Super User

If your goal is to calculate the overall average across multiple selected weeks, you might need a slightly different approach. One way is to use a measure that sums all the forecast values and then divides by the number of distinct weeks in your filtered context, something like this: (create three measures)
Total Forecast = SUM(Budget[Forecast])
Number of Weeks = DISTINCTCOUNT(Date[Week Beginning])
Average Weekly Volume = DIVIDE(Total Forecast, Number of Weeks)





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Hi Armustafa, unfortunately that calculation won't give me an accurate average as each week will have different volumes.

 

I really need to group the Forecast units by Week Beginning, then average those totals for the 52 weeks. For example. the Sum volume for week one is 300 units. Each week, that sum will be different, and those weekly totals need to be averaged.  Thanks.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.