Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I am trying to count only values within the current calendar year and failing. Please could someone point me in the right direction!
I have the following
=count({<DateRaisedIMS={"=year(Today())"},ValueID={'*24*'}, IncidentType={'*Accident*'}, ListTitle={'*Employee*'}>}ValueID)
However this brings back every Value ID in the system
How do I tweak this to just bring back current calendar year figures? I do not want to define a date as it will be part of a dashboard
Thanks in advance
Toby
Forgot to close the parenthesis after Year(DateRaisedIMS
Try this:
=count({<DateRaisedIMS={"=Year(DateRaisedIMS) = year(Today())"},ValueID={'*24*'}, IncidentType={'*Accident*'}, ListTitle={'*Employee*'}>}ValueID)
Do you need a dollar expansion ?
=count({<DateRaisedIMS={"$(year(Today()))"},ValueID={'*24*'}, IncidentType={'*Accident*'}, ListTitle={'*Employee*'}>}ValueID)
Try this:
=count({<DateRaisedIMS={"$(=year(Today()))"},ValueID={'*24*'}, IncidentType={'*Accident*'}, ListTitle={'*Employee*'}>}ValueID)
HTH
Best,
Sunny
Try looking into InYear() function at help (F1)
Hi Bill,
I don't know, I should have taken that out as it was used in a previous calculation and have tweaked that to try and get the result I was after
Toby
Thanks Sun but unfortunately that did not work
Thanks Jonathan I will take a look
Is DateRaisedIMS a date field???? If yes then you will need to further tweak your formula to be something like this:
=count({<DateRaisedIMS={"=Year(DateRaisedIMS = year(Today())"},ValueID={'*24*'}, IncidentType={'*Accident*'}, ListTitle={'*Employee*'}>}ValueID)
Yes DateRaisedIMS is a date field and is the field I am using for all calculations, unfortunately the tweak you made did not work either.
Something like:
If(InYear('01/05/2014',Today(),0),'Y','N') as CurrentYearFlag
you can add this in your Calendar Script, something like:
If(InYear(TempDate,Today(),0),1,0) as CurrentYearFlag,