Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Good afternoon,
In a chart, I use expression
count({<JJJJ.MM={"$(KeyDate)"}>}distinct(EmployeeNr))
where I let the user enter the KeyDate (say 2015.12) via an InputBox. So far, so good. Now how can I build expressions for the previous years i.e. 2014.12, 2013.12, etc? Somehow I don´t get the syntax right...
Thanks in advance
Maybe using the JJJ.MM string and I had another typo: remove the extra ')' in date# function, it should be:
count({<JJJJ.MM={"$(=date(addmonths(date#('$(KeyDate)','YYYY.MM'),-12),'YYYY.MM')"}>}distinct EmployeeNr)
Or using AddYears():
count({<JJJJ.MM={"$(=date(AddYears(date#('$(KeyDate)','YYYY.MM'),-1),'YYYY.MM')"}>}distinct EmployeeNr)
Not tested, if you can upload a sample I can try with real data.