Help with temporal error in report

Hi All!

 

I have the following expression in an anniversary report (to return next month but last year)

<<TEXT(MONTH(TODAY())+1,”MMMM”)>> / <<TEXT(YEAR(TODAY()),”YYYY”)>>

 

I keep getting the following error: Expression 'TEXT(YEAR(TODAY()),”YYYY”)' is invalid due to: TEXT function with two arguments requires a temporal type and text representing a date format.

 

Help?

 

 

0 3 141
3 REPLIES 3

This is because YEAR() and MONTH() return Number values not Date, and actually you do not need them. Your expressions should be:

TEXT(TODAY(),”YYYY”)

and

TEXT(TODAY(),”MMMM”)

I need math around it.... i need it to give me NEXT Month but Last Year. I got the month part going but the Year is still giving trouble:

 

When i use <<TEXT(YEAR(TODAY()) - 1,”YYYY”)>> i get the following error:

Expression 'TEXT(YEAR(TODAY()) - 1,”YYYY”)' is invalid due to: TEXT function with two arguments requires a temporal type and text representing a date format.

 

When i use <<YEAR(TODAY()) - 1>> i get a comma in the number:

MissMargo_1-1645656471304.png

Help?

 

 

I see, thanks.

This should work:

TEXT( EOMONTH( TODAY(), -1 * MONTH(TODAY()) ), "YYYY")

Top Labels in this Space