I need to create a formula to color code red for any 2 months below threshold within 4 rolling month period. The value that needs to be verified for each month is % on time: sum(on time)/sum(total). Below is a simplified dataset. Example: if the user selects period 2019-05, the formula must check the % on time for may, April, March and February. If 2 of those months have a % on time below a certain threshold I need to color the background of a column red.
The output table is grouped by name and period and has the value % on time but only the selected period is displayed (while the calculation must check the max of selected period and previous 3 months)