CASE WHEN {trandate} BETWEEN '01/01/2023' AND '01/31/2023' THEN {amount} ELSE 0 END
How do i get this to be relative so when date is in the month start and end date of the month this year
r
RJMNS
02/08/2023, 10:40 PM
There's an Add_months function that would probably work. I think you can use negatives with that.
s
scottvonduhn
02/08/2023, 11:14 PM
this might work (untested):
CASE WHEN LAST_DAY({trandate}) = LAST_DAY({today}) THEN {amount} ELSE 0 END
scottvonduhn
02/08/2023, 11:15 PM
LAST_DAY should return the last day of the month for the date parameter passed to it, and should give equal results if both dates are in the same month