Forum Discussion
How to filter for unique values
Hi everyone!
I have a data set that looks like this:
| Name | Method |
| Test1 | Low |
| Test2 | Low |
| Test3 | High |
| Test1 | High |
I would like to filter the powerbi visual to only have names show up that are unique and of my method of choosing. There are 3 cases for my data set. 1) Test1 has a high and low method and should be filtered out. 2) Test2 is only found in the low method. And 3) Test3 is only found in the high method.
I would like to have a matrix graph in PowerBI that will only display the Test3 - only appears in the high method set. Thank you in advance!
I was able to figure out the solution!
I just had to make a calculated column with the following equation:
Exists in Low =var _low = SELECTCOLUMNS(filter(Table, 'Table'[Method] = "Low"), "Name", [Name])returnIF( 'Table'[Name] in _low, "Not Unique", "Unique")This returned a column that listed whether each Named entry was included in the low method. I filtered the page on method = high and exists in low = unique. This gave me what I was looking for, unique values that were not contained in the low method and just the high method.
3 Replies
- parry2kSuper User
- LowspinNew Member
No the slicer doesn't fix my problem. Because it doesn't fix my first condition (Values that have a high and low value for method are not excluded).
- LowspinNew Member
I was able to figure out the solution!
I just had to make a calculated column with the following equation:
Exists in Low =var _low = SELECTCOLUMNS(filter(Table, 'Table'[Method] = "Low"), "Name", [Name])returnIF( 'Table'[Name] in _low, "Not Unique", "Unique")This returned a column that listed whether each Named entry was included in the low method. I filtered the page on method = high and exists in low = unique. This gave me what I was looking for, unique values that were not contained in the low method and just the high method.