Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hello,
I am trying to compute a running total for a forecast per year, but not from the beginning of the year, just from the first date when there are no more actuals.
It is shown in a table per month/year.
I have come up with the formula below, however I cannot understand why my forecast is always summed from the beginning of the year (Jan 1st) - all dates are working correctly, LastDateWithSpending is giving me the right date, DATESBETWEEN is correctly starting from the LastDateWithSpending+1...
[Forecast] measure is just the sum of the Forecast column.
How do I force DAX to ignore the forecast from Jan 1st until the LastDateWithSpending and only start the cumulative sum from LastDateWithSpending+1 day?
WIth the formula below, I get correctly 0 for all months before the month of LastDateWithSpending, however the first non blank month is the sum of all forecast for the previous months since beginning of the year.
Thanks!
Kind regards
Valeria
Solved! Go to Solution.
Hi @ValeriaBreve one of possible implementation is following:
1. In Date table insert column with code
Proud to be a Super User!
Hi @ValeriaBreve one of possible implementation is following:
1. In Date table insert column with code
Proud to be a Super User!
Thanks! This works 🙂
I still don't get why my code was not working... well I'll probably get to it when I am finished with the DAX course by Marco Russo and Alberto Ferrari! Give me a few months though - my brain is limited 😂
Thanks again :-0)
@some_bih Hello, it really looks quite simple...
But I can't figure it out.
I am adding a column with epected result, and another one with what I am getting today with my formula (so what I DON'T want).
And this should be by YEAR (so every following year the running total of the forecast is resetting and starting again from Jan)
Thanks!
Kind regards
Valeria
Date | Actuals | Forecast | Expected Result | What I am getting today… |
Jan-23 | 56 | 67 | ||
Feb-23 | 26 | 30 | ||
Mar-23 | 35 | 47 | ||
Apr-23 | 26 | 29 | ||
May-23 | 35 | 35 | 208 | |
Jun-23 | 37 | 72 | 245 | |
Jul-23 | 63 | 135 | 308 | |
Aug-23 | 30 | 165 | 338 | |
Sep-23 | 26 | 191 | 364 | |
Oct-23 | 39 | 230 | 403 | |
Nov-23 | 35 | 265 | 438 | |
Dec-23 | 55 | 320 | 493 |
Hi @ValeriaBreve please provide some sample data and expected output with your solution.
Proud to be a Super User!
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
11 | |
10 | |
10 | |
9 | |
8 |
User | Count |
---|---|
17 | |
13 | |
12 | |
11 | |
8 |