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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Anonymous
Not applicable

Stacked Report Data / Last Forecast

My raw data contains stacked montly reports that are updated each month with the months updated actuals and new forecast. Since the 'forecasts' of realised actuals become equal I am looking a 'previous forecast' series  takes the forecast for the previous month at each datapoint, i.e the forecast the month before the actual was realised. I have included an example below.

 

Date
Report Date
01/12/201801/01/201901/02/201901/03/201901/04/201901/05/201901/06/2019
01/01/2019437875459013521365477432730413575623734878
01/02/201943787545901337155746356840000530667125944
01/03/2019437875459013371557290603459816439199173360
01/04/2019437875459013371557290603559816439199173360

 

The figure highlighted in bold should make up my new series as the forcast from the previous report before that date.

 

Date01/12/201801/01/201901/02/201901/03/201901/04/2019
Current Forecast437875459013371557290603559816
Previous Forecast437875459013521365463568459816

 

The fields in question are:  [Report_Date], [Date] and [Current Forecast]

 

Thanks

 

3 REPLIES 3
v-cherch-msft
Microsoft Employee
Microsoft Employee

Hi @Anonymous 

You may try below measure:

Previous Forecast =
IF (
    MAX ( Table1[Date] ) <= MINX ( ALL ( Table1 ), Table1[Report Date] ),
    CALCULATE ( MAX ( Table1[Value] ) ),
    CALCULATE (
        SUM ( Table1[Value] ),
        FILTER (
            Table1,
            Table1[Report Date]
                = DATE ( YEAR ( Table1[Date] ), MONTH ( Table1[Date] ) - 1, DAY ( Table1[Date] ) )
        )
    )
)

Regards,

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Thanks @v-cherch-msft 

I amended your code slightly to the following, which is closer to the solution I require as pulls in last months figures, however going forward I need to use the the value that reflects the earliest available report.

 

Previous Forcast Forum = 
IF (
    MAX(‘Table1’[Date]) <= MINX( ALL(‘Table1’), ‘Table1’[Report Date ]),
    CALCULATE(SUM(‘Table1’[Value])),
    CALCULATE(SUM(‘Table1’[Value]), DATEADD(‘Table1’[Report Date ],-1,MONTH)
            )
)

I presently get the following result, however need the value where the report date = date, to be equal across all reports.

a.png

 

 

 

 

Hi @Anonymous 

Could you share some data sample and expected output? You can upload the .pbix file to OneDrive and post the link here. Do mask sensitive data before uploading.

Regards,

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors
Top Kudoed Authors