Here is a workaround for you. You can create two tables for filtering.
year = DISTINCT('Table'[Year])
month = DISTINCT('Table'[Month])
Do not create relationships between tables.
then create a measure
MEASURE =
IF (
MAX ( 'Table'[Year] ) = MAX ( 'year'[Year] )
&& MAX ( 'Table'[Month] ) < MAX ( 'month'[Month] )
&& MAX ( 'Table'[Type] ) <> "C",
1
)
add this measure to visual filter and set to 1.