Forum Discussion

Nadim1313's avatar
Nadim1313
New Member
2 years ago
Solved

ISINSCOPE in a Matrix Hierarchy

Hi,   I was trying to test if I can rank rows based on their hierarchy level group using the isinscope function in a switch statement.   Initially I tested the following:   Test is in scope = ...
  • Idrissshatila's avatar
    2 years ago

    Hello Nadim1313 ,

     

    you should in reverse order. So if level one is above in a visual and level 2 is below, then use Level2, level 1

    Test is in scope = 
    SWITCH(
        TRUE(),
        ISINSCOPE(DimProductSubcategory[ProductSubcategoryName]),
        2,
        ISINSCOPE(DimProductCategory[ProductCategoryName]),
        1
        )