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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
AG_PBI
Frequent Visitor

Weekly running average

Hi,

I am new to Power BI and this is my first report. I have a dataset as follows:

Loan NumberSubmission WeekVolume
Loan111000
Loan212000
Loan312000
Loan423000
Loan523000
Loan631000
Loan733000
Loan834000
Loan932000

 

In the report dashboard I need to present it like this:

Sub WeekTotal VolumeWeekly Running Avg Vol
150005000
260005500
3100007000

I refeered a few WINDOW function videos, but not able to get the weekly running average. Please suggest.

1 ACCEPTED SOLUTION
AG_PBI
Frequent Visitor

I figured it out. In the RunningSum calculation, it should be ALL('submit') instead of ALL('submit'[Submission Week]). Then it worked. Thanks!

View solution in original post

6 REPLIES 6
Kedar_Pande
Super User
Super User

@AG_PBI 

New Measurs

Total Volume = SUM('YourTableName'[Volume])
Weekly Running Avg Vol = 
AVERAGEX(
DATESINPERIOD(
'YourTableName'[Submission Week],
MAX('YourTableName'[Submission Week]),
-3,
WEEK
),
[Total Volume]
)

This should help you get the desired results in your Power BI report.

💌 If this helped, a Kudos 👍 or Solution mark would be great! 🎉
Cheers,
Kedar
Connect on LinkedIn

 

Kedar_Pande
Super User
Super User

@AG_PBI 

New Measurs

Total Volume = SUM('YourTableName'[Volume])
Weekly Running Avg Vol = 
AVERAGEX(
DATESINPERIOD(
'YourTableName'[Submission Week],
MAX('YourTableName'[Submission Week]),
-3,
WEEK
),
[Total Volume]
)

This should help you get the desired results in your Power BI report.

💌 If this helped, a Kudos 👍 or Solution mark would be great! 🎉
Cheers,
Kedar
Connect on LinkedIn

 

AG_PBI
Frequent Visitor

I figured it out. In the RunningSum calculation, it should be ALL('submit') instead of ALL('submit'[Submission Week]). Then it worked. Thanks!

Anonymous
Not applicable

Hi @AG_PBI , hello ,rajendraongole1, thank you for your prompt reply!

Congratulations on solving this issue and thanks for sharing your solution.

 

Please remember to accept your solution as answer.

 

It will do great help to those who meet the similar question in this forum.

 

Thanks again for your contribution.

 

AG_PBI
Frequent Visitor

Thanks for your swift feedback. But it is not working as expected. I split the code and found that 'RunningSum' is exactly same as 'Total Volume'. It is just giving the sum of that week itself instead of doing the total with previous week(s).

rajendraongole1
Super User
Super User

Hi @AG_PBI - create a measure for the total weekly volume as below 

Total Volume =
SUM('Table'[Volume])

 

Now create one more measure to calculates the average of all weekly total volumes up to the current submit week.

 

rajendraongole1_0-1730150720312.png

 

Weekly Running Avg Vol =
VAR CurrentWeek = MAX('submit'[Submission Week])
VAR RunningSum =
    CALCULATE(
        SUM('submit'[Volume]),
        FILTER(
            ALL('submit'[Submission Week]),
            'submit'[Submission Week] <= CurrentWeek
        )
    )
VAR WeekCount =
    COUNTROWS(
        FILTER(
            ALL('submit'[Submission Week]),
            'submit'[Submission Week] <= CurrentWeek
        )
    )
RETURN
    DIVIDE(RunningSum, WeekCount)


)
RETURN
DIVIDE(RunningSum, WeekCount)

 

shared the expected output in above snapshot. 

 

Hope it works.





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

Proud to be a Super User!





Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.