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])
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!
I believe @Marc_Dillonโs method will do the exact same thing more elegantly (and probably faster) than mine.
Try:
SELECT(Personal[Name], [Role]=โWorkerโ) - LIST([Worker1])
User | Count |
---|---|
38 | |
35 | |
27 | |
23 | |
18 |