Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
I want to create an average based on 4 weeks
I have the following weeks and totals:
the total for weeks 1, 2, 3, 4 is 160
the total for weeks 2, 3, 4, 5 is 195
the total for weeks 3, 4, 5, 6 is 182
the total for weeks 4, 5, 6, 7 is 181
the total for weeks 5, 6, 7, 8 is 174
the total for weeks 6, 7, 8, 9 is 157
the total for weeks 7, 8, 9, 10 is 176
the total for weeks 8, 9, 10, 11 is 201
-- based on if I only have 8 - 4 week periods-- I want to create a calculation that averages the totals above or
160 +195+182+181+174+157+176+201=1426 / 8 = 178.25
I need a calulation that will total the four week periods (like above) then create the average. Thank you
Solved! Go to Solution.
You could do the grouping into sets of 4 weeks and then average those sums but this should be mathematically equivalent to taking the weekly average for all weeks and multiplying by 4.
If your data is at a weekly granularity already, then this should be as simple as
Avg 4 Weeks = 4 * AVERAGE ( Table1[Total] )
If not, then you'll need something more like this:
Avg 4 Weeks = 4 * AVERAGEX ( VALUES ( Table1[WeekNum] ), [SumTotalMeasure] )
You could do the grouping into sets of 4 weeks and then average those sums but this should be mathematically equivalent to taking the weekly average for all weeks and multiplying by 4.
If your data is at a weekly granularity already, then this should be as simple as
Avg 4 Weeks = 4 * AVERAGE ( Table1[Total] )
If not, then you'll need something more like this:
Avg 4 Weeks = 4 * AVERAGEX ( VALUES ( Table1[WeekNum] ), [SumTotalMeasure] )
User | Count |
---|---|
85 | |
80 | |
76 | |
49 | |
41 |
User | Count |
---|---|
114 | |
56 | |
51 | |
42 | |
42 |