Guinaba
Board Regular
- Joined
- Sep 19, 2018
- Messages
- 233
- Office Version
- 2016
- Platform
- Windows
Hi guys,
Any suggestion on how I can replace SELECTEDVALUE on the expression below to be used in Power Pivot?
Week Product Group Accuracy % := 1 -
(
SUMX (
SUMMARIZE (
IBPData,
IBPData[Product Group ID],
IBPData[Week Start],
"Actuals", SUM ( IBPData[Sales] ),
"Stat Adjusted", SUM ( IBPData[Stat Adjusted] ),
"Final for Weekly", sum( IBPData[Final for Weekly] ),
"4wk Lag", SUM ( IBPData[4wk Lag Forecast] ),
"13wk Lag", sum( IBPData[13wk Lag Forecast] ),
"Latest Plan M-1", SUM ( IBPData[Latest Plan M-1] ),
"IBP Plan M-3", sum(IBPData[IBP Plan M-3])
),
ABS (
[Actuals]
-
Switch( True(),
SELECTEDVALUE('Forecast Version'[Switch Number] ) = 0,
[Stat Adjusted],
SELECTEDVALUE('Forecast Version'[Switch Number] ) = 1,
[Final for Weekly],
SELECTEDVALUE('Forecast Version'[Switch Number] ) = 2,
[4wk Lag],
SELECTEDVALUE('Forecast Version'[Switch Number] ) = 3,
[13wk Lag],
SELECTEDVALUE('Forecast Version'[Switch Number] ) = 4,
[Latest Plan M-1],
SELECTEDVALUE('Forecast Version'[Switch Number] ) = 5,
[IBP Plan M-3]
)
))
/ SUM ( IBPData[Sales] )
)
Any suggestion on how I can replace SELECTEDVALUE on the expression below to be used in Power Pivot?
Week Product Group Accuracy % := 1 -
(
SUMX (
SUMMARIZE (
IBPData,
IBPData[Product Group ID],
IBPData[Week Start],
"Actuals", SUM ( IBPData[Sales] ),
"Stat Adjusted", SUM ( IBPData[Stat Adjusted] ),
"Final for Weekly", sum( IBPData[Final for Weekly] ),
"4wk Lag", SUM ( IBPData[4wk Lag Forecast] ),
"13wk Lag", sum( IBPData[13wk Lag Forecast] ),
"Latest Plan M-1", SUM ( IBPData[Latest Plan M-1] ),
"IBP Plan M-3", sum(IBPData[IBP Plan M-3])
),
ABS (
[Actuals]
-
Switch( True(),
SELECTEDVALUE('Forecast Version'[Switch Number] ) = 0,
[Stat Adjusted],
SELECTEDVALUE('Forecast Version'[Switch Number] ) = 1,
[Final for Weekly],
SELECTEDVALUE('Forecast Version'[Switch Number] ) = 2,
[4wk Lag],
SELECTEDVALUE('Forecast Version'[Switch Number] ) = 3,
[13wk Lag],
SELECTEDVALUE('Forecast Version'[Switch Number] ) = 4,
[Latest Plan M-1],
SELECTEDVALUE('Forecast Version'[Switch Number] ) = 5,
[IBP Plan M-3]
)
))
/ SUM ( IBPData[Sales] )
)