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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
LillaF
New Member

Quarterly Average from daily forecast data

Guys,

 

I need help in calculating the quarterly average forecast from my forecast values (need a DAX measure).

 

I have a fact table, 'Forecasted Value':

 

LillaF_0-1732294830451.png

 

And a Calendar table:

 

LillaF_1-1732294862424.png

 

The two are linked by the "Date" column in the Data model. 

 

Can you help how I should go about this?

 

Thanks a lot!

Lilla

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @LillaF 

Please try the following measure:

Measure = 
VAR _quarter = QUARTER(SELECTEDVALUE('Table'[Date]))
VAR _year = YEAR(SELECTEDVALUE('Table'[Date]))
RETURN
CALCULATE(AVERAGEX(FILTER(ALL('Table'),QUARTER('Table'[Date]) = _quarter && YEAR('Table'[Date]) = _year),'Table'[Total Forecast]))

 

 

Result:

vjialongymsft_0-1732600550202.png

 

 

 

 

Best Regards,

Jayleny

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

Hi @LillaF 

Please try the following measure:

Measure = 
VAR _quarter = QUARTER(SELECTEDVALUE('Table'[Date]))
VAR _year = YEAR(SELECTEDVALUE('Table'[Date]))
RETURN
CALCULATE(AVERAGEX(FILTER(ALL('Table'),QUARTER('Table'[Date]) = _quarter && YEAR('Table'[Date]) = _year),'Table'[Total Forecast]))

 

 

Result:

vjialongymsft_0-1732600550202.png

 

 

 

 

Best Regards,

Jayleny

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Thanks a lot Jayleny, it worked! 😀

LillaF
New Member

Hi Sachin,

 

Sure, please see here: https://docs.google.com/spreadsheets/d/1Gn-cXFcAoEMto5wqLRj2Tp62gu9JEuaEGXJdVvDJrbY/edit?usp=sharing 

 

This is the desired output. I'm not sure how to make this look kinda the same in Power BI.

 

Thanks:

Lilla

Rupak_bi
Super User
Super User

Hi @LillaF ,

 

What is your desired output? See if you create a matrix using the fact table, keeping date (hirerchey)  in the row , average of forcast in the value and family in the column, you should get quarterly avg values. hope you have already tried this. SO were are you stucking.



Regards
Rupak
FOLLOW ME : https://www.linkedin.com/in/rupaksar/

Hi @Rupak_bi,

 

Thanks for answering. Actually my customer wants to compare the 3-months rolling forecast with the quarterly average forecast value, that's why I would rather keep the monthly scales in the rows and not go for date hierarchy. 

 

I have created the 3-months rolling forecast measure, see in Report view:

 

LillaF_0-1732366034321.png

3-months Rolling Forecast = 
CALCULATE([Total Forecast],DATESINPERIOD(Calendar_Lilla[Date],MAX(Calendar_Lilla[Date]),-3,MONTH))
 
And I would need to add the quarterly average forecast to this matrix. So I'm not looking for the monthly forecast like this:
 
LillaF_1-1732366406122.png

 

But I need the qly avg forecast in this column, while keeping the monthly scale in the matrix. (So for Oct'24, Nov'24 and Dec'24, I would need avg $660,767 to be displayed. For Jan'25, Feb'25, Mar'25, I would need $1,784,158 to be displayed.

 

Wondering if it's feasible somehow..?

 

If not, I will go for changing the dates for dates (hierarchy).

 

Thank you!

Lilla

Can you post some sample data ?



Regards,
Sachin
Check out my Blog

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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