DAX' to rank the most recent games, considering possible repeated game names, based on the 'MinDateFlag'

Question: I am trying to analyze video game dataset, analyzing data from the 'Table1 ’ table. This table contains information about various video games, including their hitrate, game type, winrate, release date, and other details. Some game names may be repeated in the table. i want to create a combined DAX measure named ‘CombinedDAX’ that calculates the rank of the most recent games where the ‘MinDateFlag’ is 1.

Additionally, MinDateFlag represents a flag indicating the minimum release date for each game, even if the game name is repeated in the table. It is calculated
based on the release date of each game. If the release date of a game matches the minimum release date for that game, the MinDateFlag is set to 1; otherwise, it is set to 0.

I tried this its not working please help, attached a sample file

CombinedDAX =
VAR MinDateFlag =
IF(
‘Dim Game’[Release Date] = CALCULATE(MIN(‘Dim Game’[Release Date]), ALLEXCEPT(‘Dim Game’, ‘Dim Game’[Game Name])),
1,
0
)
VAR RecentGamesRank =
IF(
MinDateFlag = 1,
RANKX(
FILTER(‘Dim Game’, MinDateFlag = 1),
‘Dim Game’[Release Date],
,
DESC,
Dense
),
BLANK()
)
RETURN
RecentGamesRank

example.pbix (46.8 KB)