I am assuming that you want to filter based on the maximum date found in your dataset :
First, you need to identify the maximum date in your dataset. You can use an aggregate transformation to find the max date
If your date is in a string format like mm/dd/yyyy, use the toDate() function in a derived column transformation to convert it to a date format: toDate(your_date_column, 'MM/dd/yyyy'). If not skip this step
Now, you will need to calculate the start date for the 24-month range. After getting the max date (let's call this max_date), you can calculate the start date of your 24-month period.
Here you need to use a derived column transformation to subtract 24 months from max_date. The expression can be like addMonths(max_date, -24)
Now, use a Filter transformation to keep only the rows within the last 24 months. The condition should check if the date column is between the start date and the max_date.