Filtering an enum list

So I have an enum list which I want to populate from a table of personality traits. The personality traits table has a corresponding contactid that is a reference to a Contact table. However, I want the user to enter several new traits in the personality trait table for themselves and then choose the top 3 traits. So I have a field in the Contact table which is an enum list that is connected to the personality trait table; however, it brings back all the personality traits for everyone instead of just the person whose record I’m on. How can I filter the list to only see that user’s personality traits for them to choose the top 3? I tried basing the data validity on a slice but it didn’t work…don’t know if I’m thinking about this all wrong. I also tried doing a “REF_ROWS” function in the data validity but it only brings back the ID because it has to link to the ID. Any help appreciated.

Valid If to select a contact’s own traits:

SELECT(
  Personality Traits[Trait Name],
  ([_THISROW] = [ContactID]),
  TRUE
)

Sorted alphabetically:

SORT(
  SELECT(
    Personality Traits[Trait Name],
    ([_THISROW] = [ContactID]),
    TRUE
  )
)

Allow only 3 (untested):

SORT(
  IF(
    (COUNT([Top 3 Traits])) < 3),
    SELECT(
      Personality Traits[Trait Name],
      ([_THISROW] = [ContactID]),
      TRUE
    ),
    [Top 3 Traits]
  )
)
2 Likes

Steve- thanks for all your help…syntax is everything so thanks for this

Bryan Coley
Chief Creative Officer

Reel Experiences

1 Like