Hi @Teja1234 ,
Do you want to compare date with the max date of every month?
If so, you need to firstly group your data based on month.
Try this formula:
AddColumns(GroupBy(AddColumns(test,"month",Month(Date)),"month","dates"),"maxdate",Last(SortByColumns(dates,"Date")).Date)
//test is my collection name, you could replace with yours
Then you will get a table like this:

The month column is the date's month, maxdate column is the max date of this month.
You could use formula like this to justify whether this action perform:
If(SelectedDate>=LookUp(
AddColumns(
GroupBy(
AddColumns(test,"month",Month(Date)),
"month","dates" //group based on month
),
"maxdate",
Last(SortByColumns(dates,"Date")).Date
),//add a column with the max date of the month
Month(SelectedDate)=month,maxdate
),//look up the max date based on selecteddate's month
true_condition_code,
false_condition_code
)
Best regards,