Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Nandita27
Partner - Contributor II
Partner - Contributor II

Need help for dynamic default bookmark to set as Previous Month

Hi Team,

I wanted to set Dynamic default bookmark as previous month compare to system date but my expression is not working

=J&J Calendar Month = Date(Addmonths(Today(), -1), 'MMMM') where J&J Calendar Month  is my field name

Nandita27_0-1689532489111.png

 Can anyone help me on this.

Thanks,

Regards,

Nandita

Labels (2)
2 Solutions

Accepted Solutions
CezarioAbrantes
Contributor III
Contributor III

Hi Nandita,

You can try this:

=[J&J Calendar Month]=Month(MonthStart(Today()-1))

AddMonths would return 17/06/2023, while MonthStart returns 01/06/2023 and it is more useful for month comparisons.

Regards

Cezário

View solution in original post

Nandita27
Partner - Contributor II
Partner - Contributor II
Author

Thank you Satish it is working for me only thing I had to change it to like this since my Month value was in full name like January, February etc.

=Num(Month(Date#([J&J Calendar Month],'MMMM'))=num(month(date(addmonths(today(),-1),'DD/MM/YYYY')))

 

Thanks a lot 🙂

View solution in original post

4 Replies
Satish251
Partner - Contributor II
Partner - Contributor II

Hello @Nandita27,

Try this,

=Num([J&J Calendar Month])=num(month(date(addmonths(today(),-1),'DD/MM/YYYY')))  

Note: Change Date format if it is not same in your date field.

CezarioAbrantes
Contributor III
Contributor III

Hi Nandita,

You can try this:

=[J&J Calendar Month]=Month(MonthStart(Today()-1))

AddMonths would return 17/06/2023, while MonthStart returns 01/06/2023 and it is more useful for month comparisons.

Regards

Cezário

Nandita27
Partner - Contributor II
Partner - Contributor II
Author

Thank you Satish it is working for me only thing I had to change it to like this since my Month value was in full name like January, February etc.

=Num(Month(Date#([J&J Calendar Month],'MMMM'))=num(month(date(addmonths(today(),-1),'DD/MM/YYYY')))

 

Thanks a lot 🙂

Nandita27
Partner - Contributor II
Partner - Contributor II
Author

Thanks a lot Cezario for your suggestion. Since my month value was in full name I had to change it as below and it is working for me

=Date(MonthStart(Today(),-1),'MMMM')

Anyway later my customer changed the requirement like Dynamically need to select from January to Last Month(i.e as of today till June) instead of only selecting June so I have implemented as below 

=Num(Month(Date#([J&J Calendar Month],'MMMM'))<=num(month(date(addmonths(today(),-1),'MM/DD/YYYY')))

 

Thanks again. Appreciating your help!!

 

Regards,

Nandita