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

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now

Reply
Anonymous
Not applicable

running sum of future 3 month data

Hi Team,

Need help in solving the below problem.

We need to take the running sum of future 3 month data based on the month.

DateData 
1/1/201910 
1/5/201920 
1/7/201930 
2/2/20195 
2/15/201945 
2/25/201947 
3/1/201950 
3/6/201920 
3/27/201945 
4/4/201965 
4/25/201935 
4/29/201925 
5/1/201965 
5/10/201940 
6/15/201954 
7/25/201925 
8/24/201936 
   
outputDataComment
Jan-19337Running sum of Feb,march ,April
Feb-19345running sum of march,april,may
Mar-19284Running sum of April ,may ,june
Apr-19184

Running sum of May ,June, July

 

 

Thanks,
Raj

1 ACCEPTED SOLUTION
Anonymous
Not applicable

You will need a Calendar table if you dont have one already. Make sure it has a Year, MonthName, MonthNumber ( to sort month name) column.  

 

Related that to yoru main table on Date (1:M) and make sure to put columns from the Calendar tables as filters ( rows, columns, ect).

 

Then you can write these two measures:

Total of Data = SUM ( Table2[Data] )


Total of Next 3 Months = 
CALCULATE( 
    [Total of Data],
     DATESBETWEEN(
         DimCalendar[Date], 
         LASTDATE(DimCalendar[Date]), 
            DATEADD(
                LASTDATE(DimCalendar[Date]),3,MONTH)
    )
)

And here's the final table:

Sum of Next 3 Months.png

 

 

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

You will need a Calendar table if you dont have one already. Make sure it has a Year, MonthName, MonthNumber ( to sort month name) column.  

 

Related that to yoru main table on Date (1:M) and make sure to put columns from the Calendar tables as filters ( rows, columns, ect).

 

Then you can write these two measures:

Total of Data = SUM ( Table2[Data] )


Total of Next 3 Months = 
CALCULATE( 
    [Total of Data],
     DATESBETWEEN(
         DimCalendar[Date], 
         LASTDATE(DimCalendar[Date]), 
            DATEADD(
                LASTDATE(DimCalendar[Date]),3,MONTH)
    )
)

And here's the final table:

Sum of Next 3 Months.png

 

 

Anonymous
Not applicable

Hi I used the same data and formula from above. Here is what I come up with: 

best_lina_0-1673365568129.png

I don't understand why Dec-19 has 617 as the next 3 months total. Can you please help? Thank you! 

Anonymous
Not applicable

Hi Nick,,

Can you send me the pbix file.

 

Thanks,

Raj

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.