Dear community,
I would like to ask how do we minus one month if we have the data below :
I have attached in the excel file below for the reference as well.
Many thanks
Hey @SH_94, you need to convert to a date then you can remove one month from it.
PadLeft(ToString(DateTimeMonth(DateTimeAdd(ToDate('2022-'+[Month]+'-01'),-1,'month'))),2,'0')
@SH_94 A different approach can be like this.
And for a 3rd different approach, try this
if month="01" then "12" else padleft(tostring(tonumber([Month])-1),2,"0") endif
Dan