SUBSTITUTEWITHINDEX – DAX Guide

SUBSTITUTEWITHINDEX: Returns a table which represents the semijoin of two tables supplied and for which the common set of columns are replaced by a 0-based index column.
https://dax.guide/substitutewithindex/