How to write function in report definition to pull cases from Friday to Sunday on Monday?
When user pull the report everyday, report pull cases from previous day. So I coded in filter, pxCreatDate is equal to Previousday. But on Monday, I want report to pull cases from Sunday, Saturday and Friday. How to do it?
Given the standard SQL date functions available, it seems like it would not be difficult to check if the current day is a Monday using DAYOFWEEK(CURDATE())=2, and if it is, use DATE_SUB() to subtract 2 extra days from the previous day you are already calculating in your "Previousday" function alias.