Hello, I'm trying to write out an if/else formula that converts a current month value to previous month whereby the field values are expressed numerically (202112, 202201, 202202, etc). For 11 months out of the year, the formula [Current Month] -1 suffices. However, this becomes problematic when Current Month ends in 01 because [202201] -1 = 202200. For January, the formula would instead need to read as [202201] -89 = 202112.
How would I write out a formula to where "IF Current Month ends in '01', then [Current Month] - 89 else [Current Month] -1 endif?
Solved! Go to Solution.
Hey @Jake5, how does this look? As the field will most likely be read numerically, you just need to use the ToString() function so that you can also apply the EndsWith() function - which only works on strings - to check for the '01'.
Thank you both! Both solutions worked.
I may consider using the date option. Either works.