Reduce "Valid If" List

Hey guys,
my column looks like this:

Column name: “Worker2”
Type: “Name”
Valid If: “SELECT(Personal[Name], [Role]=“Worker”)”

So task is, to reduce the list of names, where I get with my “valid if”, minus the value of the column
“Worker1” so that I can’t select a worker twice.

Is this possible? How I can solve this task?
Any ideas?

I believe this should work:

SELECT(Personal[Name], [Role]=“Worker”)-SELECT(Personal[Name], [Name]=[_THISROW].[Worker1])

1 Like

Is the ‘Personal’ table different from this one with the [worker1] and [worker2] columns?

I believe you can use an AND expression inside of your select to add a check against the [worker1] column. Such as:

[worker2] valid_if = SELECT(Personal[Name], AND( [Role]=“Worker” , [Name] <> [_THISROW].[Worker1] ) )

4 Likes

I believe @Marc_Dillon’s method will do the exact same thing more elegantly (and probably faster) than mine.

2 Likes

Try:

SELECT(Personal[Name], [Role]=“Worker”) - LIST([Worker1])
2 Likes

2 Likes

@Marc_Dillon its working perfectly!!! Thank you very much!

2 Likes