Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have expressions in variables, such as the following:
=If((vMeasure) = 'EquivPrice',
(Num(Sum({<ShipDate_DayOfWeek={'Tue'},Week={'$(vWeek)'},ShipYear={'$(vYear)'}>}ExtendedPrice) / Sum({<ShipDate_DayOfWeek={'Tue'},Week={'$(vWeek)'},ShipYear={'$(vYear)'}>}EquivalentUnits),'$##.00'))
,
If((vMeasure) = 'CartonPrice',
(Num(Sum({<ShipDate_DayOfWeek={'Tue'},Week={'$(vWeek)'},ShipYear={'$(vYear)'}>}ExtendedPrice) / Sum({<ShipDate_DayOfWeek={'Tue'},Week={'$(vWeek)'},ShipYear={'$(vYear)'}>}CartonEquiv),'$##.00')),
(Num(Sum({<ShipDate_DayOfWeek={'Tue'},[Week]={'$(vWeek)'},ShipYear={'$(vYear)'}>}$(vMeasure)),'#,##0'))
)
)
As seen in the Variables editor, the one for vTueOrd (expression above) is changed to a value instead of an expression. The one in vMonOrd is almost exactly the same (only ShipDate_DayOfWeek is different), but it behaves correctly.
Please advise.
I think I figured it out. The "=" sign at the beginning of the expression is forcing it to evaluate. What is confusing is that it's not behaving that way for vMonOrd, only the other variables. I edited all of the other variables, starting with vTueOrd, and removed the "=" sign, and now all variables are behaving correctly.
I think I figured it out. The "=" sign at the beginning of the expression is forcing it to evaluate. What is confusing is that it's not behaving that way for vMonOrd, only the other variables. I edited all of the other variables, starting with vTueOrd, and removed the "=" sign, and now all variables are behaving correctly.
I see that your vMeasure is evaluated using $ in vTueOrd . Could that be the reason ?
It was the "=" sign at the beginning of the expression. I removed it, and now it is behaving correctly. Thanks for your response!