
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Count Previous Month
Hi All,
I have an expression below to select data for the current month
count({<DateRaised={"=(MonthName(addmonths(today(),0))" },ValueID={'*24*'}, IncidentType={'*Accident*'}, ListTitle={'*Employee*'}>}ValueID)
I know the Month function works as I have used it on labels but for some reason I am getting no numbers back from the expression but it validates?
I have attached the qv file and the elements are on the sheet two tab. Any help would be greatly appreciated!
Toby
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This formula should work:
=Count({<DateRaised={"=MonthName(DateRaised) = MonthName(addmonths(today(),-2))" },ValueID={'*24*'}, IncidentType={'*Accident*'}, ListTitle={'*Employee*'}>}ValueID)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Date raised is a timestamp field like this (DD/MM/YYYY hh:mm:ss) and you are comparing it to a MonthYear field. This won't work. You will get a result if you compare the same formats.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks sunindia
I did wondered if it might be a format issue. I have a DateraisedIMS formatted to dd/mm/yyyy, how do I then match it up?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This formula should work:
=Count({<DateRaised={"=MonthName(DateRaised) = MonthName(addmonths(today(),-2))" },ValueID={'*24*'}, IncidentType={'*Accident*'}, ListTitle={'*Employee*'}>}ValueID)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Fantastic, thank you Sunindia

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please find attached your application. You will see 0 for May and Apr because there are no ValueID available for those period, but March has 4 ValueID
HTH
Best,
Sunny

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No Problem.
