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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
Shuuuu
Frequent Visitor

Forecast for running total

how to make a running total for each month ?

In power bi, I have a table refering the image below contains 12 month per year that only show single month and actual column is value get from summary table 

Shuuuu_0-1710053063210.png

But I want to display the cumulative forecast like if slicer is selected to January it will show the cumulative actual for january value until december like below image (below table is illustrated in excel. Not going to be load in power bi) 

Shuuuu_1-1710053168263.png

But if slicer is selected to February it will show like below. Which mean January value will be the actual but february is the sum of Jan + feb then the cumulative of march until dec will be using the feb actual value (below table is illustrated in excel. Not going to be load in power bi) 

Shuuuu_2-1710053300827.png

Same goes for the rest of the month if it already has the actual value. 

Below are the tables i have in power bi 

Shuuuu_0-1710053579228.png

 

4 REPLIES 4
Dangar332
Resident Rockstar
Resident Rockstar

Hi, @Shuuuu 

make a seprate table of Month no from date table
newtable = all(date[month no])

 

and use it in a slicer and don't make relationship with your data model

 

make a new column in actual spent table

column =
var curr_month = selectedvalue(newtable[month no])
return
sumx(
    filter(
      CROSSJOIN(
          values(date[month no]),
          values(actual spent[actual forecast])
      ),
      date[month no]<=curr_month
    ),
    actual spent[actual forecast]
)

 

Hi @Dangar332  its just showing one month total instead of increasing like image above for january

Hi, @Shuuuu 

 

Try to add zero after sumx()+0

Still not working then provide sample data 

hi @Dangar332, I change my solution. Right now it able to cumulative prefectly for january. But when select slicer february it only cumulative the february data. The concept is nearly correct. But I want the output of feb - march like below. 

For example, 
jan - only cumulative jan value
feb - jan + feb + then march until dec is cumulative using feb value 
march - jan + feb + march + april until dec is cumulative using march value
same goes to when select other month slicer (slicer have jan until dec)

concept that I want when select february slicer 

Shuuuu_0-1710144176644.png

right now in pbi, its appear like below

Shuuuu_1-1710144308643.png


the formula i used

Forecast Spent =
VAR CurrentMonth = MONTH(MAX('Calendar'[Date]))
VAR Cumulative =
    IF(
        CurrentMonth = 1, // Start cumulative from January
        CALCULATE (
            SUMX (
                FILTER (
                    ALLSELECTED('Calendar'[MonthNo],'Calendar'[MonthShortName]),
                    'Calendar'[MonthNo] <= MAX('Calendar'[MonthNo])
                ),
                Summary[Actual Spent]
            )
        ),
        IF(
            CurrentMonth > 1, // Start cumulative from February onwards
            CALCULATE (
                SUMX (
                    FILTER (
                        ALLSELECTED('Calendar'[MonthNo],'Calendar'[MonthShortName]),
                        'Calendar'[MonthNo] <= MAX('Calendar'[MonthNo])
                    ),
                    Summary[Actual Spent]
                )
            ),
            BLANK() // Return blank for other months
        )
    )
RETURN
    Cumulative

my tables 
Shuuuu_2-1710144382252.png

 

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

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

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.