I had created a calculated column to get last month data by subtracting '1' from month using the following code:
string(int(rightstr(leftstr(string(now()),7),2))-1)
But it doesn't work when it's january (january = 1, so 1-1 = 0).
I have already researched about if else statement, but didn't find about it in Column Engine language.
Tried the following code, but doesn't work.
if('ActualMonth'='1', string(int("MesAtual")+11),
if("ActualMonth" > '1', 'ActualMonth', string(int('ActualMonth')-1))
)
Can anyone help me?
Thanks in advance.