Forum Discussion
Find Distinct Data - Based On Two Columns
I believe we are very close to addressing my problem. I am still having the issue of the current filters being broken when applying the measure. Please see below for another example of the data as well as the expected result. As a reminder i am wanting to remove the codes identified by "Internal" as well as the "Outside" line items that had codes identified by both "Internal" & "Outside". The end result giving me only the unique codes identified by "Outside".
Note the following:
1.) Internal vs Outside is a calculated column to help identify where the code came from
2.) Student column is Pre-Filterd from another page that is highlighting a specific student, there are thousands of students we can select from in the full database
Sample Data Set
| Internal vs Outside | Student | Code |
| Internal | Student 1 | 1 |
| Outside | Student 1 | 1 |
| Outside | Student 1 | 2 |
| Internal | Student 1 | 3 |
| Outside | Student 1 | 4 |
| Outside | Student 1 | 5 |
| Outside | Student 1 | 6 |
| Outside | Student 1 | 7 |
| Internal | Student 1 | 8 |
| Outside | Student 1 | 8 |
| Outside | Student 1 | 9 |
Expected Result
| Internal vs Outside | Student | Code |
| Outside | Student 1 | 2 |
| Outside | Student 1 | 4 |
| Outside | Student 1 | 5 |
| Outside | Student 1 | 6 |
| Outside | Student 1 | 7 |
| Outside | Student 1 | 9 |
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"
)
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.