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?

0 6 501
6 REPLIES 6

Bahbus
New Member

I believe this should work:

SELECT(Personal[Name], [Role]=โ€œWorkerโ€)-SELECT(Personal[Name], [Name]=[_THISROW].[Worker1])

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] ) )

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

Bahbus
New Member

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

Steve
Platinum 4
Platinum 4

Try:

SELECT(Personal[Name], [Role]=โ€œWorkerโ€) - LIST([Worker1])

Bahbus
New Member

2X_d_d300f17697521f2358daf18b342b92e600a79b8d.gif

Top Labels in this Space