Forum Discussion

Mahesh0016's avatar
Mahesh0016
Super User
3 years ago

ISINSCOPE Function Not Working

Hello Community,

> I have one problem with the isinscope it's not working properly. 
For E.g I have two tables  A and B that have one too many relationships Table A [Account ID] to Table B [Account ID].

Table A

Account IDAccount Name
1D
2P
3A
4M
5R

 

Table B

Project IDAccount IDProject Name
11ABC
21XYZ
31PQR
42STU
52LMN
62OPQ
73DEF
83GHI
94JKL
104MNO
115WXZ
125ADS

 

Here Problem is when i plot accont name and Prject name in matrix hierarchy then i plot measure isinscope(Table A [Account Name]) it's give me result like below SS:


Measure is :
 IsinScope Account Name =
ISINSCOPE ( Account[AccountName] )


> My Expected out put like below SS:
 

Account NameIsinScope Account Name
ATrue
 DEFFalse
 GHIFalse
DTrue
 ABCFalse
 PQRFalse
XYZFalse
MTrue
 JKLFalse
 MNOFalse
PTrue
 LMNFalse
 OPQFalse
 STUFalse
RTrue
 ADSFalse
 WXZFalse
  

7 Replies

  • Hi Mahesh0016 ,

     

    You can check if the scope is account and not the project to get expected output, so create a measure with below DAX expression,

     

    IsinScope Account Name =

    ISINSCOPE('Table A'[Account Name]) && not ISINSCOPE('Table B'[Project Name])

     

    Please refer to the below screenshot for the same,

     

     

    Thanks!

     

    Inogic Professional Services Division

    Power Platform and Microsoft Dynamics 365 CRM Development – All under one roof!

    Drop an email at [email protected]

    Services:  http://www.inogic.com/services/

    Power Platform/Dynamics 365 CRM Tips and Tricks:  http://www.inogic.com/blog/

    • Mahesh0016's avatar
      Mahesh0016
      Super User

      SamInogic 
      Thank you for your reply but it is not my Expected output.

      This is my Expected output. Thank You!!

      • SamInogic's avatar
        SamInogic
        Super User

        Hi,

         

        Ok, to filter out your result you need to create a measure with below DAX expression,

         

        CountAccountIDs = COUNT('Table B'[Account ID])


        Then Add this measure to the filter condition of the table as

         

        CountAccountIDs is not blank

         

        Please refer to the below screenshot,

         


        Thanks!

         

        Inogic Professional Services Division

        Power Platform and Microsoft Dynamics 365 CRM Development – All under one roof!

        Drop an email at [email protected]

        Services:  http://www.inogic.com/services/

        Power Platform/Dynamics 365 CRM Tips and Tricks:  http://www.inogic.com/blog/

    • Mahesh0016's avatar
      Mahesh0016
      Super User

      SamInogic Thank you, it is right but in my case, I have no blank value.

      so in that case what I do, please guide me. Thank You!!

      • SamInogic's avatar
        SamInogic
        Super User

        Hi Mahesh0016 ,

         

        As you mentioned tables in question, we have used the same table data.

        These are not blank values when we use matrix and add Account from Table A and Project Name from Table B in Rows, it joins two table. You can try to add the “Account ID” column in Values section of matrix and able to see blank cells as shown in below screenshot.

         

        For example, for Account “A”, available projects are DEF and GHI but in matrix you will be able to see all list of project with Account ID column only contain count 1 for DEF and GHI. So Measure “” helps you to get appropriate data as mentioned in above steps.

         

        Let me know if this works for you or else could it be possible to share a sample .pbix file so we can check and help you resolve the issue?

        Thanks!

         

        Inogic Professional Services Division

        Power Platform and Microsoft Dynamics 365 CRM Development – All under one roof!

        Drop an email at [email protected]

        Services:  http://www.inogic.com/services/

        Power Platform/Dynamics 365 CRM Tips and Tricks:  http://www.inogic.com/blog/

  • Anonymous's avatar
    Anonymous
    Not applicable

    Use It,
    IsinScope Account Name =
    NOT(ISINSCOPE(Account[AccountName]))