Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
When I use the following in a text box the result displayed is 2017 (or 2018, depending on AsOfDate) :
=If(Year(AddMonths(AsOfDate,-1))=Year(AddMonths(AsOfDate,0)),Year(AddMonths(AsOfDate,0)),Year(AddMonths(AsOfDate,-1)))
I need to use this in a set analysis statement, though. I tried the following without success:
=Count( { <Month=,Year-{"=If(Year(AddMonths(AsOfDate,-1))=Year(AddMonths(AsOfDate,0)),Year(AddMonths(AsOfDate,0)),Year(AddMonths(AsOfDate,-1)))"} >} Products)
TIA
Try this
=Count({<Month,Year = {"$(=If(Year(AddMonths(AsOfDate, -1)) = Year(AddMonths(AsOfDate, 0)), Year(AddMonths(AsOfDate, 0)), Year(AddMonths(AsOfDate, -1))))"}>} Products)