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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Forecast by month aggregate to year problem

In a Power BI forecast report I would like to make a forecast based on data of previous years

 

These are my steps so far:

 

  • In 3 base measures I calculate a percentage by period: 
% Actual Same Period Year -1 =
CALCULATE (
    Transactions[Actual],
    DATEADD ( 'Calendar - Transactiondate'[Date], -1, YEAR )
)
    / CALCULATE (
        Transactions[Actual],
        PARALLELPERIOD ( 'Calendar - Transactiondate'[Date], -1, YEAR )
    )

 (for "% Actual Same Period Year -2" and "% Actual Same Period Year -3" I have similar calcualtions)

 

  • I create an average percentage on the previous percentages:
% AVG Actual Previous 3 Years =
 ( 'Transactions'[% Actual Same Period Year -1]
 + 'Transactions'[% Actual Same Period Year -2]
 + 'Transactions'[% Actual Same Period Year -3] )
 / 3 

 

  • This average percentage is multiplied by the total year budget of the current year, this way I have a forecast amount of every month in the current year:
Forecast € All Year =
CALCULATE (
 Transactions[Budget Amount],
 ALL ( Transactions[FutureBookingIndicator] ),
 ALL ( 'Calendar - Transactiondate'[MonthNr] )
)
 * Transactions[% AVG Actual Previous 3 Years]

 

  • Next I want for the months where actuals are available to see  the actual amount in the forescast measure and for the future months the calcalated forecast amounts. So I will have a mix of actual and forecast:
Forecast =
IF ( [Actual €] = 0, [Forecast € All Year], [Actual €] )

 

 So far everything works as expected, but…

 

  • Next I want to be able to aggregate the forecast to year level.

The problem is that on total year (or on a visual where months are not displayed) I only see the actual amount, which is logical because Actual is not 0 on this level.

I tried to use the HASONEFILTER option to bypass this problem but I cannot figure out what the formule on the TRUE side must be:

Forecast =
IF (
    HASONEFILTER ( 'Calendar - Transactiondate'[MonthNr] ),
    IF ( [Actual €] = 0, [Forecast € All Year], [Actual €] ),
    <TRUE>
)

 Any suggestions? Or other possible solutions?

 

1 ACCEPTED SOLUTION
v-chuncz-msft
Community Support
Community Support

@Anonymous,

 

You may use a similar way as shown here.

Community Support Team _ Sam Zha
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

3 REPLIES 3
v-chuncz-msft
Community Support
Community Support

@Anonymous,

 

You may use a similar way as shown here.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

@v-chuncz-msft: Figured it out!  Thank you.

 

It works with an extra measure on top of the Forecast measure

Aggregatable Forecast=
SUMX (
    SUMMARIZE ( Transactions, 'Calendar - Transactiondate'[MonthNr] ),
    [Forecast]
)
Anonymous
Not applicable

@v-chuncz-msft, Thank you for your reply, I am having trouble to translate the suggested solution to my situation

Could you please give me another suggestion?

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors