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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Calculate dynamic forecast using historical data

Hello,

 

Please excuse me for summarizing and using improper formating in this message - I'm new to this!

 

(This is not about the forecast feature built-into Power BI visualizations)

 

I'm trying to determine how to create a forecast measure that is built fundamentally like this:

forecast ($) = opportunity total ($) x close % x age distribution %

 

Opportunity total is an easy sum measure.

Close % is an easy divide calculation.

Age Distribution is a table, and this is where I get out of my experience. In excel, this is easy using sumproducts, but it's static.

 

Age Distribution is a table that looks like this for 18 months:

*Note that the month would be number of months back from today (or current selected). That is, a forecast for March is a piece of each month behind it.

MonthAge%
1.20
2.15
3.11
4.08
5.06
6.04

 

I would like to be able to virtually calculate the following table:

*See note above - months may be considered negative numbers

MonthAge%Close%Opp TotalForecasted Sales
10.20.3$1,000$60
20.150.3$800$36
30.110.3$1,100$36
40.080.3$900$22
50.060.3$750$14
60.040.3$1,300$16
   Total$183

 

The "total" shown here would be the result of the measure. The table above would be virtual. I believe I'd have to:

  1. Define variables
  2. Build the table virtually
  3. SUMX calculations for each row (forecast = close% x opp total x age %)

I'm trying to provide enough detail for help, but not so much that I drown out the core of my question. Please let me know if I can provide more detail.

 

Thank you all so much! This forum has been very instructive.

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

Hi @Anonymous 

 

Kindly try below measure:

I use the [measureclose]and [measureopp] to represent the measure Close % and Opportunity total

Forecasted Sales = [Measureclose]*[MeasureOpp]*MAX('Table (3)'[Age%])

 Then 

SUMXForecast = SUMX(VALUES('Table (3)'[Month]),[Forecasted Sales])

06.PNG

Community Support Team _ Dina Ye
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

2 REPLIES 2
v-diye-msft
Community Support
Community Support

Hi @Anonymous 

 

Kindly try below measure:

I use the [measureclose]and [measureopp] to represent the measure Close % and Opportunity total

Forecasted Sales = [Measureclose]*[MeasureOpp]*MAX('Table (3)'[Age%])

 Then 

SUMXForecast = SUMX(VALUES('Table (3)'[Month]),[Forecasted Sales])

06.PNG

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.
parry2k
Super User
Super User

@Anonymous try the following measure

 

Forecast = 
SUMX ( 
VALUE ( MonthTable[Months] ), 
CALCULATE ( MIN ( Table[Age %] ) * CALCULATE ( MIN ( Table[Close %] ) * [Oppy Total Measure] 
)

 

Would appreciate Kudos 🙂 if my solution helped.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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