ISINSCOPE – DAX Guide

ISINSCOPE: Returns true when the specified column is the level in a hierarchy of levels.
https://dax.guide/isinscope/