Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Referring to Current month, previous month, and the month before

Hey guys,

I had a doubt which i hope you guys will be able to solve for me.

I refer to the current month name in my text code as : =Monthname(max(MonthName))   >> This returns April as value.

The previous month is referred to as : =Monthname(max(MonthName)-1)  >> This returns March as value.

However, i want to display the month name before that (to show data for 3 months). So I tried =Monthname(max(MonthName)-2). ------ But for some reason it still returns the month name - March------

Could someone tell me where i'm going wrong? Thanks a ton! 😃

1 Reply
spividori
Specialist
Specialist

Hi.

In the expression: Monthname(max(MonthName)-1) returns 31.03 and Monthname(max(MonthName)-2) returns 30.03.

You could use something like this:

=monthName(date((max(AñoMes)-1)-(day((max(AñoMes)-1)))))

I do not know if there will be another way to do it.

Hope this help.

Regards.