Forum Discussion
Find Distinct Data - Based On Two Columns
- 6 years ago
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. - 6 years ago
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.
Thank you! This works for this small data sample, perfectly.
However, i am now running into another issue. When i try to apply this to my total data file (Hundreds of Names & Thousands of Codes) it is clearing my previous filters that narrow the data down to a specific name
Do you know what might be causing this?
This will provide more clarity, i hope. I have a filter in my reports that already filters down to the "Student" i want to look at. When i put the above formula in, it appears to break my Student Filter and give me all of the students in the table instead of only showing the unique codes for the identified student.
Sorry for the added confusion/complexity
| Student | Name | Code |
| Student 1 | Name G | 1 |
| Student 1 | Name C | 1 |
| Student 1 | Name G | 2 |
| Student 1 | Name F | 2 |
| Student 1 | Name B | 2 |
| Student 1 | Name G | 3 |
| Student 1 | Name F | 3 |
| Student 1 | Name A | 3 |
| Student 1 | Name A | 4 |
| Student 1 | Name A | 5 |
| Student 1 | Name A | 6 |
| Student 1 | Name A | 7 |
| Student 1 | Name B | 8 |
| Student 2 | Name B | 9 |
| Student 2 | Name F | 10 |
| Student 2 | Name B | 10 |
| Student 2 | Name F | 11 |
| Student 2 | Name G | 12 |
| Student 2 | Name A | 13 |
| Student 2 | Name D | 14 |
| Student 2 | Name G | 15 |
| Student 2 | Name D | 15 |
| Student 2 | Name C | 16 |
| Student 2 | Name A | 17 |
| Student 2 | Name G | 18 |
| Student 2 | Name A | 18 |
| Student 2 | Name B | 18 |
| Student 2 | Name H | 19 |
| Student 2 | Name G | 19 |
- v-lid-msft6 years agoCommunity Support
Hi rhcentennialh ,
I am sorry for missing this situation, we can use the following measure to meet your requirement, If it doesn't meet your requirement, Please show the exact expected result based on the Tables that you have shared.
Not identified by A = IF ( SELECTEDVALUE ( 'Table'[Code] ) IN SELECTCOLUMNS ( FILTER ( ALLSELECTED ( 'Table' ), [Name] = "Name A" ), "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.- rhcentennialh6 years agoHelper II
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 - v-lid-msft6 years agoCommunity Support
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.