Hi team please tell me like below calculated field will be work in calculated field or not
i have define the variable here but result one iam getting the error
please clarify
var last_month= sum(ifelse(
truncDate(‘MM’, date) = truncDate(‘MM’, addDateTime(-1, ‘MM’, now())),
{Generated value},
0
))
var last_to_last_month=sum(ifelse(
truncDate(‘MM’, date) = truncDate(‘MM’, addDateTime(-2, ‘MM’, now())),
{Generated value},
0
))
ifelse({last_to_last_month}=0,1,({last_month}-{last_to_last_month})/{last_to_last_month})