Forum Discussion
Anonymous
3 years agoNot applicable
Calculated Column not working
I have a calculated column using the formula below.......the result returned is not as expected.
ACT/FC = IF([FP Year]<[Current Year]||[FP Month]<[Current Month],"Actual","Forecast")
The value returned for Jan 23 - Sep 23 should be "Forecast" but its returning "Actual"??
Can anyone help? Thanks
Hi Anonymous ,
Try this instead:ACT/FC = VAR _FPDate = DATE([FP Year], [FP Month], 1) VAR _CurrDate = DATE([Current Year], [Current Month], 1) RETURN IF(_FPDate < _CurrDate, "Actual", "Forecast")
5 Replies
- hnguy71Super User
Hi Anonymous ,
I think you need to adjust your formula to use AND instead of OR:
ACT/FC = IF([FP Year] < [Current Year] && [FP Month] < [Current Month], "Actual", "Forecast") - AnonymousNot applicable
Thanks but that hasnt worked either, result below using AND
- hnguy71Super User
Hi Anonymous ,
Try this instead:ACT/FC = VAR _FPDate = DATE([FP Year], [FP Month], 1) VAR _CurrDate = DATE([Current Year], [Current Month], 1) RETURN IF(_FPDate < _CurrDate, "Actual", "Forecast")- AnonymousNot applicable
Thanks but that didnt work either, delivered the same result as the original formula