I'm working on a Beast Mode where I have a given an amount of production that I want to divide by the remaining days of the month. The method I have below doesn't function the way I want it to. My code segment is below. Is there any easier way to go about doing this? Thanks in advance.
(SUM(`Goal`) - SUM(`Production`)) / (LAST_DAY(CURDATE())-DAYOFMONTH(CURDATE()))