@wubbs11 Logic is as follows - I have initialized variable DtNow is set to UtcNow() but you need to set your dynamic value, I have then initialized two variable Month & Year. Then I get month & year value using expression
formatDateTime(variables('varDateNow'),'MM')
formatDateTime(variables('varDateNow'),'yyyy')
Then I have a switch case on month value, so in my case I get the month value as "02" then it goes in switch case "02" in which I have mapped the earlier month which is January and then from the year value I substract 1 which gives me earlier year value.
Switch case based on month value:
01 : December
02: January
03: Februray
04: March and so on...
Hope this helps.
--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.