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
rhcentennialh
Helper II
Helper II

Find Distinct Data - Based On Two Columns

I have a database where I would like to identify unique codes that a particular person has not identified or coded. Below is an example of my problem.

 

Problem: I would like to exclude all of the codes "Name A" has identified/coded as well as the other "Names" for those identify codes, please see the data example below. 

 

Excluding just "Name A" codes is easy however i also want to remove the "Names" associated with Code 3 & Code 18 since they are also related to code "Name A" has identifed/captured.

 

NameCode
Name G1
Name C1
Name G2
Name F2
Name B2
Name G3
Name F3
Name A3
Name A4
Name A5
Name A6
Name A7
Name B8
Name B9
Name F10
Name B10
Name F11
Name G12
Name A13
Name D14
Name G15
Name D15
Name C16
Name A17
Name G18
Name A18
Name B18
Name H19
Name G19
2 ACCEPTED SOLUTIONS

Hi @rhcentennialh ,

 

We use the following measure and get the expected result:

 

Not identified by Outside = 
IF (
    SELECTEDVALUE ( 'Table'[Code] )
        IN SELECTCOLUMNS ( FILTER ( ALLSELECTED ( 'Table' ), [Internal vs Outside] = "Internal" ), "c", [Code] ),
    BLANK (),
    "YES"
)

15.PNG

 

 

 

BTW, pbix as attached.

 

Best regards,

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Hi @rhcentennialh ,

 

Can it filter the data you want if we put the following measure into the Visual Filter then set the condition as greater than zero?  Please try it without the measure in the value filed of table visual.

 

Not identified by Outside 2 = 
IF (
    SELECTEDVALUE ( 'Table'[Code] )
        IN SELECTCOLUMNS ( FILTER ( ALLSELECTED ( 'Table' ), [Internal vs Outside] = "Internal" ), "c", [Code] ),
    0 ,
    1
) 

 

Best regards,

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

20 REPLIES 20

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.