You can use DAX functions to do so, which will be:
Occurence =
COUNTX (
FILTER ( yourTable, EARLIER ( yourTable[Col A] ) = yourTable[Col A] ),
yourTable[Col A]
)
COUNTX -This function Counts the number of rows of that table that contain a number or an expression that evaluates to a number when evaluating an expression over