Forum Discussion

Lowspin's avatar
Lowspin
New Member
4 years ago
Solved

How to filter for unique values

Hi everyone! 

 

I have a data set that looks like this: 

 

Name

Method

Test1Low
Test2Low
Test3High
Test1High

 

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])
    return
    IF( '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

  • Lowspin is this what you are looking for?

     

     

    Follow us on LinkedIn and  to our YouTube channel

    I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

    • Lowspin's avatar
      Lowspin
      New 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). 

  • 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])
    return
    IF( '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.