Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I need to create a bar chart showing the Yearly Forecast for each month -
x axis: Month
y axis: Forecast
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!!
@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
Proud to be a Super User! |
|
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...
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 16 | |
| 8 | |
| 4 | |
| 4 | |
| 3 |
| User | Count |
|---|---|
| 25 | |
| 13 | |
| 12 | |
| 10 | |
| 6 |