If you don't care about Feburary sometimes having 29 days, your simplest option may be to create a static inline table with NoOfDays and connect it to your calendar. Using a field makes your expressions simpler, and IMHO it may even make performance a tiny little bit better. Not sure of the last one, though.
LOAD * INLINE [
You can also add a field DaysInMonth to your calendar, an fill it using the Day(MonthEnd(CalDate)) formula. That would take care of the leap years.