Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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 using the same analogy 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! 😃
- Justin
Try this.
=monthname(addmonths(max(Date),-1))
Use the Date field instead of monthname.
Regards,
Kaushik Solanki
Hi,
Try like this
=MonthName(AddMonths(Max(DateFieldName))) //To get current / max month name
=MonthName(AddMonths(Max(DateFieldName), -1)) | //To get previous month name |
=MonthName(AddMonths(Max(DateFieldName), -2)) | //To get second previous month name |
If you want to display data for all the 3 months like count/sum then use like this
=Sum({<DateFieldName={'>=$(=MonthStart(Max(Date), -2))<=$(=Max(DateFieldName))'}>} Sales)
Hope this helps you.
Regards,
Jagan.