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

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.

Reply
Gabiiiii
Frequent Visitor

Calculating Yearly Forecast and show it by month in a bar chart

I need to create a bar chart showing the Yearly Forecast for each month -

x axis: Month

y axis: Forecast

Gabiiiii_0-1720685765840.png

 

Forecast = Actual Cost from Jan to previous month + Budget from this month to Dec.

 

The bar chart should show the yearly forecast calculated on monthly basis for both historically and prospectively

 

How to write the DAX function for it? Thank you!! 

2 REPLIES 2
bhanu_gautam
Super User
Super User

@Gabiiiii ,First create a measure for Actual Cost Up

ActualCostToDate =
CALCULATE(
SUM(Financials[ActualCost]),
DATESBETWEEN(
'Date'[Date],
DATE(YEAR(TODAY()), 1, 1),
EOMONTH(TODAY(), -1)
)
)

 

BudgetCostToEndOfYear =
CALCULATE(
SUM(Financials[BudgetCost]),
DATESBETWEEN(
'Date'[Date],
EOMONTH(TODAY(), 0) + 1,
DATE(YEAR(TODAY()), 12, 31)
)
)

 

YearlyForecast = [ActualCostToDate] + [BudgetCostToEndOfYear]

 

Use Yearly Forecast measure in Y axis




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Hi bhanu, really appreciate your reply! However, I have tried similar approach, it will only show the month-on-month value if I use month as the x axis. I need to show the yearly value for each month, 

for example:

Jan: Budget from Jan-Dec

Feb: Actual for Jan + Budget from Feb-Dec

...

Also, I do not have a date column to use, only a single "month“ column in text format

 

I've tried with AllExcept function, it's also not working as expected...

 

 

Helpful resources

Announcements
May PBI 25 Carousel

Power BI Monthly Update - May 2025

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

May 2025 Monthly Update

Fabric Community Update - May 2025

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