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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register 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
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.

March Power BI Update Carousel

Power BI Community Update - March 2026

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