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! Learn more

Reply
dfox09
Helper III
Helper III

Way to add months

I have a table that shows revenue by producer by month which I am trying to build a forecast for. The current formula will not show a forecast for any future months as there is no productivity that has taken place yet. How do I prepopulate future months by producer?

Here is the formula that I am currently using based on help from Ibendlin.

Forward Forecast5 =
var m = SELECTEDVALUE(DimDate[StartOfMonthDate])
var t = EDATE(m,-12)
var i = DATEDIFF(t,Date(2020,04,30),MONTH)
var a = CALCULATE(SUM(TBL_Summarized_Actuals[Revenue]),
DATESBETWEEN('DimDate'[Date],t,DATE(2020,04,30)))
Return i
4 REPLIES 4
amitchandak
Super User
Super User

@dfox09 ,Can you share sample data and sample output in table format?

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Here is sample data for one producer. You will see thatthere is no revenue past 202006 (calendar month).

dfox09_0-1595873664420.png

Here is a table with revenue for June and July but nothing after. Where it says "Infinity" I would like that populated based on the formula heretofor mentioned.

dfox09_1-1595873991615.png

 

Don

dax
Community Support
Community Support

Hi @dfox09 , 

I am not sure whether you want to get result like below

799.PNG

You could refer to my sample for details(create a calendar table, then use this in Table and set "Show items with no data")

Best Regards,
Zoe Zhi

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

HI Zoe,

Thank you for the suggestion. I am already using that and I have the dates populated but I think the formula is getting hung up on the months with no data. The other thing, is that the formula, itself is not calculating correctly when I compare it to Excel.

dfox09_0-1595943689518.png

Excel AVG is the correct calculation.

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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