The sale been made and fits the criteria (Sold By) Peter, (Status) WON, (Result) 100%, (Current Month Sales) this month/yer date, it returns dollar value.
The job has been invoiced, (Invoiced Date) todays date 25/02/17 (Nz Time) returns (Comms Due Date) 20th of the following month, in this case 20/03/17.
So when (Current Month Comms), the month and year we are in equals (Comms Due Date) then it returns the dollar value (Value of Jobs) *0.002.
So when the commission date to be paid is 20/03/17 and the calendar rolls over to March 2017 then current month commissions will calculate value of jobs and calculate 2% of it.
=SUMIFS([Comms Due Date]2, IFERROR(MONTH(@cell), "") = MONTH(TODAY()), [Comms Due Date]2, IFERROR(YEAR(@cell), "-") = YEAR(TODAY()))