Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
moshiera
Frequent Visitor

What are the differences between duplicates of another column

Here is an example of a test i'm doing... I would like to see visually what are the differences between column "Source".  I have no idea where to start.  See below for table example.  

 

I would like to see:

 

AD NOT IN SD

ComputerB, ComputerD, ComputerF

 

SD not in AD

ComputerX

 

 

 Compare Tools Example.PNG

2 ACCEPTED SOLUTIONS
harshnathani
Community Champion
Community Champion

Hi @moshiera ,

 

You can create a Calculated Column,

 

Calculated_Value =

var __ADSD = EXCEPT(CALCULATETABLE(VALUES(Table4[Column1]),Table4[Column2] = "SD"),CALCULATETABLE(VALUES(Table4[Column1]),Table4[Column2] = "AD"))
var __SDAD = EXCEPT(CALCULATETABLE(VALUES(Table4[Column1]),Table4[Column2] = "AD"),CALCULATETABLE(VALUES(Table4[Column1]),Table4[Column2] = "SD"))
return
SWITCH(
true(),
Table4[Column1] IN __ADSD,"SD Not in AD",
Table4[Column1] IN __SDAD,"AD Not in SD",
""
)
 
123.JPG
 
 
Regards,
Harsh Nathani
 
do not hesitate to give a kudo to useful posts and mark solutions as solution

View solution in original post

v-kelly-msft
Community Support
Community Support

Hi @moshiera

 

Create a measure as below:

 

 

Measure =
VAR _AD =
    CALCULATETABLE (
        DISTINCT ( 'Table'[Computer Name ] ),
        FILTER ( ALL ( 'Table' ), 'Table'[Source] = "AD" )
    )
VAR _SD =
    CALCULATETABLE (
        DISTINCT ( 'Table'[Computer Name ] ),
        FILTER ( ALL ( 'Table' ), 'Table'[Source] = "SD" )
    )
RETURN
    IF (
        MAX ( 'Table'[Source] ) = "AD"
            && NOT ( MAX ( 'Table'[Computer Name ] ) IN _SD ),
        "AD not in SD",
        IF (
            MAX ( 'Table'[Source] ) = "SD"
                && NOT ( MAX ( 'Table'[Computer Name ] ) IN _AD ),
            "SD not in AD",
            BLANK ()
        )
    )

 

 

 

And you will see:

Annotation 2020-04-23 111806.png

For the related .pbix file,pls click here.

 

Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!

View solution in original post

2 REPLIES 2
v-kelly-msft
Community Support
Community Support

Hi @moshiera

 

Create a measure as below:

 

 

Measure =
VAR _AD =
    CALCULATETABLE (
        DISTINCT ( 'Table'[Computer Name ] ),
        FILTER ( ALL ( 'Table' ), 'Table'[Source] = "AD" )
    )
VAR _SD =
    CALCULATETABLE (
        DISTINCT ( 'Table'[Computer Name ] ),
        FILTER ( ALL ( 'Table' ), 'Table'[Source] = "SD" )
    )
RETURN
    IF (
        MAX ( 'Table'[Source] ) = "AD"
            && NOT ( MAX ( 'Table'[Computer Name ] ) IN _SD ),
        "AD not in SD",
        IF (
            MAX ( 'Table'[Source] ) = "SD"
                && NOT ( MAX ( 'Table'[Computer Name ] ) IN _AD ),
            "SD not in AD",
            BLANK ()
        )
    )

 

 

 

And you will see:

Annotation 2020-04-23 111806.png

For the related .pbix file,pls click here.

 

Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
harshnathani
Community Champion
Community Champion

Hi @moshiera ,

 

You can create a Calculated Column,

 

Calculated_Value =

var __ADSD = EXCEPT(CALCULATETABLE(VALUES(Table4[Column1]),Table4[Column2] = "SD"),CALCULATETABLE(VALUES(Table4[Column1]),Table4[Column2] = "AD"))
var __SDAD = EXCEPT(CALCULATETABLE(VALUES(Table4[Column1]),Table4[Column2] = "AD"),CALCULATETABLE(VALUES(Table4[Column1]),Table4[Column2] = "SD"))
return
SWITCH(
true(),
Table4[Column1] IN __ADSD,"SD Not in AD",
Table4[Column1] IN __SDAD,"AD Not in SD",
""
)
 
123.JPG
 
 
Regards,
Harsh Nathani
 
do not hesitate to give a kudo to useful posts and mark solutions as solution

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.