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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
soldier_rong
Helper II
Helper II

Calculation of data for the next 6 months based on the most recent month's data

Dear~

 

I have the following data, red is historical data, green is current data (calculated using PREVIOUSMONTH), how do I calculate 202301, 202302, 202303, 202304 after yellow?

soldier_rong_0-1669086995335.png

I have the date dimension table, as in the date on the left.

Although I use PREVIOUSMONTH again, 202302 comes out with empty data...but not workd.

 

Thanks in advance

 

BR

Soldier

2 REPLIES 2
amitchandak
Super User
Super User

@soldier_rong , Next 6 month exculding current

next Rolling 6 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date],eomonth(MAX('Date'[Date]),0)+1,-6,MONTH))

 

next 6 months including the current

 

next Rolling 6 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date],eomonth(Min('Date'[Date]),-1)+1,-6,MONTH))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi @amitchandak ,

 

Cool,  however, the data on 202212 should be taken from 202211 and I drafted a sample data as the below. 

This is an iteration that relies on the previous month's data (it started out as 202212 relying on 202211)

soldier_rong_0-1669105964729.png

 

Thanks again.

 

BR,

Soldier

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.