Forum Discussion
Malsk1_1
Helper II
4 years agoData Processing for Actual and Forecast data
Hi, I have the following Actual and Forecasted spend. Month end represents the month end baseline data, planning period represents current and future Actual spend and Forecast spend. Currently ...
PaulDBrown
Community Champion
4 years agoTry:
Prev Period Forecast =
VAR PP =
CALCULATE (
MAX ( 'Table'[Forecast Period] ),
FILTER (
ALL ( 'Table' ),
'Table'[Forecast Period] <= MAX ( 'Table'[Forecast Period] )
&& NOT ( ISBLANK ( [Sum Forecast Spend] ) )
)
)
VAR PF =
IF (
ISBLANK ( [Sum Forecast Spend] ),
CALCULATE (
[Sum Forecast Spend],
FILTER ( ALL ( 'Table' ), 'Table'[Forecast Period] = PP )
),
[Sum Forecast Spend]
)
RETURN
IF ( ISINSCOPE ( 'Date Table'[Date] ), PF )
If you need the total:
Prev Period Forecast with total =
SUMX (
ADDCOLUMNS (
SUMMARIZE (
'Table',
'Date Table'[Date],
'Table'[Forecast Period],
'Table'[Project]
),
"_Total", [Prev Period Forecast]
),
[_Total]
)
to get...
I've attached the sample PBIX file
Malsk1_1
Helper II
4 years agoPaulDBrown thanks for this, i will test it out with more data and feedback.. once again, thank you!