Forum Discussion
A DAX Calculation Question
- 2 years ago
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])
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)
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.