I have a Beast Mode that I've been using that was working fine up until January 1st. The issue is that I have a number of Beast Modes that are calculating record counts for Prior Month, Prior Quarter and Prior 2 Quarters past.
They all seem to have trouble getting past the 2018 component, which I know I've coded in the Beast Mode because otherwise it was pulling quarter and month info for numerous years instead of the current year.
I assume that somehow I need to build in a case statment that checks to see what the year month is and based on that will alter the Beast Mode.
Here is a sample of what I'm using for Prior Month Beast Mode, the current Quarter -1 and Current Quarter -2 are very similar.
Let me know what I should do or if this is possible.
thanks
Randy
Sum(CASE WHEN `hireDate` <= DATE_ADD(CONCAT(MONTH(CURRENT_DATE()),'-1-',YEAR(CURRENT_DATE())), interval -1 day ) AND `dateOfTermination`IS NULL THEN 1 ELSE 0 END
+
CASE WHEN `hireDate` <= DATE_ADD(CONCAT(MONTH(CURRENT_DATE()),'-1-',YEAR(CURRENT_DATE())), interval -1 day ) AND `dateOfTermination` >= DATE_ADD(CONCAT(MONTH(CURRENT_DATE()),'-1-',YEAR(CURRENT_DATE())), interval -1 day )
Then 1 else 0
End)