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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Anonymous
Not applicable

Forecast with Average Sales MTD / Counting Working Days Rolling

Hey there!

Iam quite new to Power BI and iam trying to calculate the average Sales per working days (Rolling average) in order to generate a forecast.

I hope the table underneath will explain everything.

Im struggling with calculating the column "Working Days Rolling Count" and the column "Average Sales MTD/Forecast"

 

I have two tables. One with Sales Data and one Date Table that shows only working days.

 

Does anyone have some helpful hints how to solve this?

 

DateSalesSales MTDWorking Days Rolling CountAverage Sales MTD / Forecast
01.08.20221001001100
02.08.20221502502125
03.08.20221253253108,33
04.08.20221304554113,75
05.08.2022905455109
08.08.20221106556109,16

09.08.2022

1407957113,57

10.08.2022

  8113,57

11.08.2022

  9113,57

12.08.2022

  10113,57

15.08.2022

  11113,57

16.08.2022

  12113,57

17.08.2022

  13113,57

18.08.2022

  14113,57

19.08.2022

  15113,57

22.08.2022

  16113,57

23.08.2022

  17113,57

24.08.2022

  18113,57

25.08.2022

  19113,57

26.08.2022

  20113,57

29.08.2022

  21113,57

30.08.2022

  22113,57

31.08.2022

  23113,57

TOTAL

795795232595,93

 

6 REPLIES 6
v-easonf-msft
Community Support
Community Support

Hi, @Anonymous 

Please try calculated columns like:

Working Days Rolling Count1 = CALCULATE(COUNT('Table'[Date]),FILTER('Table','Table'[Date]<=EARLIER('Table'[Date])))
Working Days Rolling Count2 = CALCULATE(COUNT('Table'[Date]),FILTER('Table','Table'[Date]<=EARLIER('Table'[Date])&&'Table'[Sales]<>BLANK()))
Average Sales MTD / Forecast = 'Table'[Sales MTD]/'Table'[Working Days Rolling Count2]

veasonfmsft_0-1661135605919.png

If it doesn't work, please a sample file for further research。

 

Best Regards,
Community Support Team _ Eason

Anonymous
Not applicable

Hello @v-easonf-msft !
Thank you very much!!!

Based on this, is it possible to calculate column "Sales" with all the Actual sales data + the latest "Average Sales MTD / Forecast"?
Because that is actually the main goal im trying to achieve.

So for now the missing spaces in column "Sales" should be 113,57 and sum up to a total. That would be my rolling forecast, that changes everyday with further actual sales 😃

Hi, @Anonymous 

Try to add a new calculated column to replace your original column 'Sales'.

New Sales = IF(ISBLANK('Table'[Sales]),'Table'[Average Sales MTD / Forecast],'Table'[Sales])

Best Regards,
Community Support Team _ Eason

Anonymous
Not applicable

Hi @v-easonf-msft ,

 

i used your ideas and had to adapt them to my file, which might be a little bit more complex, but so far everything worked out perfectly. But! Like you can see on the screenshot Power BI doesn´t sum up "New Sales" correctly...

 

My Measures are:

 

Revenue FY = SUM(Wertposten_Excel_LIVE[IST-Umsatz])
Revenue FY MTD_DailySumUp = TOTALMTD([Revenue FY], 'Date Table Working Days'[Datum])
Avg. Rolling Revenue FY MTD = DIVIDE([Revenue FY MTD_DailySumUp],[WorkingDays<=Today])
New Sales = IF([Revenue FY]=0,[Avg. Rolling Revenue FY MTD],[Revenue FY])
New Sales MTD = TOTALMTD([New Sales], 'Date Table Working Days'[Datum])
 
I couldnt create a calculated column within my sales data, so i had to create a measure with the same content.
 
Any ideas how i can fix this?
 
UnbenanntBI.PNG
lbendlin
Super User
Super User

Yours looks more like a Total Cumulative than a Rolling average.  "Rolling" usually means a sliding window, like "the last 10 working days".

 

Please clarify.

Anonymous
Not applicable

Hello @lbendlin !
Thank you so much for your response!
Well yes i might used the wrong expression for what im trying to achieve, im sorry for that.

Like you can see in my response to @v-easonf-msft , my sliding window is actualy fixed on the right side and only sliding on the left inwards with days gone and new daily sales.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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