Get the previous quarter from current date formula #inSalesforce

Get the previous quarter from current date formula #inSalesforce


IF(TODAY() >= DATE(YEAR(TODAY()),1,1) && TODAY() <= DATE(YEAR(TODAY()),3,31),4, 

IF(TODAY() >= DATE(YEAR(TODAY()),4,1) && TODAY() <= DATE(YEAR(TODAY()),6,30),1, 

IF(TODAY() >= DATE(YEAR(TODAY()),7,1) && TODAY() <= DATE(YEAR(TODAY()),9,30),2, 

IF(TODAY() >= DATE(YEAR(TODAY()),10,1) && TODAY()<= DATE(YEAR(TODAY()),12,31),3,null))))

Comments