Forum Discussion
forcast accuracy with rolling version
- 7 years ago
hi Anonymous !
Thank you for your suggestion. In the interval I found a way to bypass the problem. In the Forcast table, I added a column = if( DATEADD('S&OP'[Forecasts Month];-2;month)= 'S&OP'[SOP version];true;false)
And I filter my calculation on this flag.
Problem solved.
Thank you anyway !
Hi fsim ,
I think you need to add all/allselected function to break current row contents and use date function to define specific date for calculate.
You can try to use following measures if they suitable for your requirement:
Ord qty =
SUM ( OrderBook[Qty Ordered] )
Forcast M-2 qty =
VAR currdate =
MAX ( 'S&OP'[SOP version] )
RETURN
CALCULATE (
SUM ( 'S&OP'[Forecasts Qty] );
FILTER (
ALLSELECTED ( 'S&OP' );
[SOP version]
= DATE ( YEAR ( currdate ); MONTH ( currdate ) - 2; DAY ( currdate ) )
);
VALUES ( 'S&OP'[Product] )
)
Forecast accuracy =
1 - DIVIDE ( ABS ( [Ord qty] - [Forcast M-2 qty] ); [Forcast M-2 qty] )
Time Intelligence "The Hard Way" (TITHW)
Managing “all” functions in DAX: ALL, ALLSELECTED, ALLNOBLANKROW, ALLEXCEPT
Regards,
Xiaoxin Sheng
- fsim7 years agoResponsive Resident
hi Anonymous !
Thank you for your suggestion. In the interval I found a way to bypass the problem. In the Forcast table, I added a column = if( DATEADD('S&OP'[Forecasts Month];-2;month)= 'S&OP'[SOP version];true;false)
And I filter my calculation on this flag.
Problem solved.
Thank you anyway !