Forum Discussion
mmarshalek
9 years agoFrequent Visitor
Calculation of 2 values different dates
I've been working on this for about 5 days now,... and really stuck... Could use help... I've attached my Power BI table.. Trying to subtract "ForecastCore3" from CM_Ship Actuals... Nee...
mmarshalek
9 years agoFrequent Visitor
Hi Herbert,
Still having issues... I'm sure is something simple but just cannot figure it out... It does not like ProductLine or RecordDate...
mattbrice
Solution Sage
9 years agoWhat are you putting on the rows? Just the Date like shown? If so how are you narrowing down the values to a particular product? Slicing by product number?
The measure should be quite straightforward:
MAPE =
VAR CM_Ship_Actuals =
SUM ( Table[CM_Ship_Actuals] )
VAR ForecastCore3MoAgo =
CALCULATE (
SUM ( Table[ForecastCore3] ),
PARALLELPERIOD ( Calendar[Date], -3, MONTH )
)
RETURN
DIVIDE ( CM_Ship_Actuals - ForecastCore3MoAgo, CM_Ship_Actuals )But it depends on what you have in row/column/slicers or other filters...