Forum Discussion

TaroGulati's avatar
TaroGulati
Helper III
4 years ago
Solved

IsInscope function issue

Hey Everyone,

 

I am having some issue with ISINSCOPE Function. 

 

i have this simple table:

 

 

I am getting this as result:

 

I am using this measure: 

measure =
SWITCH(TRUE(), ISINSCOPE('Table'[Third level]),30,ISINSCOPE('Table'[Second level]),20,ISINSCOPE('Table'[First level]),10)
 
 
I am expecting to not see any value where Raw header value is empty. for e.g i am expecting to see only B once i open A and only C once i open B. I was thinking with ISINSCOPE function, we could hide the empty values. 
 
 
Thanks in advance for any suggestions. 
 
Thanks
 
  • Hi TaroGulati 

     

    You could try this measure

    NewMeasure = 
    SWITCH (
        TRUE (),
        ISINSCOPE ( 'Table'[Third level] ),
            SWITCH (
                SELECTEDVALUE ( 'Table'[Third level] ),
                BLANK (), BLANK (),
                "", BLANK (),
                30
            ),
        ISINSCOPE ( 'Table'[Second level] ),
            SWITCH (
                SELECTEDVALUE ( 'Table'[Second level] ),
                BLANK (), BLANK (),
                "", BLANK (),
                20
            ),
        ISINSCOPE ( 'Table'[First level] ), 10,
        BLANK ()
    )
    

     

    Best Regards,
    Community Support Team _ Jing
    If this post helps, please Accept it as Solution to help other members find it.

3 Replies

  • TaroGulati , for that you have check blank too

     

    SWITCH(TRUE(), ISINSCOPE('Table'[Third level]) && not(isblank('Table'[Third level])) ,30,

    ISINSCOPE('Table'[Second level]) && not(isblank('Table'[Second level]))  ,20

    ,ISINSCOPE('Table'[First level]),10, blank() )

     

     

    • TaroGulati's avatar
      TaroGulati
      Helper III

      amitchandak thanks for your kind reply. 

       

      i am having one issue to validate this measure. ISBLANK function is not accepting the column of table. 

       

       

       

      Should i use it in some different way?

       

      thanks

       

  • v-jingzhang's avatar
    v-jingzhang
    Community Support

    Hi TaroGulati 

     

    You could try this measure

    NewMeasure = 
    SWITCH (
        TRUE (),
        ISINSCOPE ( 'Table'[Third level] ),
            SWITCH (
                SELECTEDVALUE ( 'Table'[Third level] ),
                BLANK (), BLANK (),
                "", BLANK (),
                30
            ),
        ISINSCOPE ( 'Table'[Second level] ),
            SWITCH (
                SELECTEDVALUE ( 'Table'[Second level] ),
                BLANK (), BLANK (),
                "", BLANK (),
                20
            ),
        ISINSCOPE ( 'Table'[First level] ), 10,
        BLANK ()
    )
    

     

    Best Regards,
    Community Support Team _ Jing
    If this post helps, please Accept it as Solution to help other members find it.