Hi Pique5,
I am having trouble understanding how you modified the Calendar.
Did you Merge some cells?
What is the purpose of rows 3, 5 etc.?
I am also having trouble understanding your overall aim:
However, I want it to only calculate/show the days for that month (blue numbers) not the previous for next month (grey numbers).
I tested your formula in a simpler document (no Calendar).
I turned off Menu > Numbers > General > Cell References: Use header names as labels. That makes it easier to construct and debug formulas.


The formula works.
Notes:
- I formatted Date (Column B) in Table 1 as DD MMM YYYY to become more "international" for me and others who read this.
- Day Only (Column A) in Table 2 is a Custom Format borrowed from the Calendar Template. It displays only the Day part of a Date & Time format, while storing the complete Date & Time.
Perhaps a look "behind the "curtain" in the Calendar Template will put us all on the same wavelength.
The Calendar Template is very cleverly designed, but parts are hidden.
Click on each table and Format > Table > Table Options > Tick Title to see the table name.


Click on the MONTH AND YEAR table and Menu > Table > Un-hide All Rows.
The dates in Calendar are Custom Format to display only the day. Edit Custom Format to see more "behind the curtain".

Regards,
Ian.