Hello,
I am trying to create a dynamic filter which would contain current month and the previous month.
So far I have a code for the current month.
ToDate([Last Hire Date]) <= ToDate(DateTimeTrim(DateTimeToday(),"lastofmonth")) AND ToDate([Last Hire Date]) >= ToDate(DateTimeTrim(DateTimeToday(),"firstofmonth"))
Do anybody know how can I alter this so it also pulls the date for the previous month as well?
Thanks,
@AttilaBalint Update your formula like below which will pull all the data in current month and previous month
[Last Hire Date] <= DateTimeLastOfMonth()
AND
[Last Hire Date] >= toDate(DateTimeTrim(DateTimeAdd(DateTimeToday(),-1,'month'),'firstofmonth'))
Use the below.
ToDate([Last Hire Date]) <= ToDate(DateTimeTrim((Datetimeadd(DateTimeToday(),-1,"month")),"firstofmonth"))
A small change will help you.
ToDate([Last Hire Date]) <= ToDate(DateTimeTrim(DateTimeToday(),"firstofmonth"))
(Datetimeadd(DateTimeToday(),-1,"month"))
User | Count |
---|---|
19 | |
14 | |
13 | |
9 | |
8 |