Expression for previous month

I want to point to the row of the preceeding month.

I have set an expression as:

OR(and(year([_THISROW].[Date])-year([Date])=1, month([Date])=12), and(year([Date])=year([_THISROW].[Date]), month([Date])=month([_THISROW].[Date])-1))

Its close but not the exact. Whats the problem here?

I would implement the EOMONTH function here. Which ever portion you need the previous month of do
MONTH(EOMONTH([Date], -1))

4 Likes

For reference:

2 Likes