Forum Discussion

CharlotteCity12's avatar
CharlotteCity12
Icon for Microsoft Employee rankMicrosoft Employee
2 years ago
Solved

Rows that match or do not match based on

I have the following data:

 

I wish to know if per DB the Match field in every Srv.  e.g. 

 

Stated another way.. the DB must have the same login across all servers (finding the server in the cluster that does not have all the logins as the other servers)

 

DBSrvDbdb_ownerdb_denydatawriterdb_datawriterdb_datareaderMatch
 DbBSrv1 | DbB11011,1,0,1
 DbBSrv2 | DbB11011,1,0,1
 DbBSrv3 | DbB11011,1,0,1
 DbCSrv1 | DbC10211,1,2,0
 DbCSrv2 | DbC10111,1,1,0
 DbCSrv3 | DbC10211,1,2,0

 

 

  • Anonymous's avatar
    Anonymous
    2 years ago

    Thank you PhilipTreacy  for your prompt reply.
    Hi CharlotteCity12 ,
    Based on the information you provided, I have created a sample data and you can follow the steps below:
    1. Add a new column.

    Mis = 
    VAR _DB = 'Table'[db_owner] & "," & 'Table'[db_denydatawriter] & "," & 'Table'[db_datawriter] & "," & 'Table'[db_datareader]
    RETURN
        IF ( 'Table'[Match] = _DB, "Match", "No Match" )
    

    Final output:

    How to Get Your Question Answered Quickly - Microsoft Fabric Community

    If it does not help, please provide more details with your desired out put and pbix file without privacy information.

     

    Best Regards,

    Ada Wang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

2 Replies

  • Hi CharlotteCity12 

     

    Not clear what you want.  What login are you referring to?  I dno't see anything in your data.

     

    Please supply a clear example of the desired result.

     

    Phil

  • Anonymous's avatar
    Anonymous
    Not applicable

    Thank you PhilipTreacy  for your prompt reply.
    Hi CharlotteCity12 ,
    Based on the information you provided, I have created a sample data and you can follow the steps below:
    1. Add a new column.

    Mis = 
    VAR _DB = 'Table'[db_owner] & "," & 'Table'[db_denydatawriter] & "," & 'Table'[db_datawriter] & "," & 'Table'[db_datareader]
    RETURN
        IF ( 'Table'[Match] = _DB, "Match", "No Match" )
    

    Final output:

    How to Get Your Question Answered Quickly - Microsoft Fabric Community

    If it does not help, please provide more details with your desired out put and pbix file without privacy information.

     

    Best Regards,

    Ada Wang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.