Hello there, I hope all is good
I want to do slice row filter condition
I have driver column which is of type ref to workers table.
I also have inspector column which is of type ref to workers table as well.
I have a task column of enumlist value. (contains delivery, inspection .....)
-----
I want to make ifs expression where if task contains for example delivery .. then filter only email of the driver.
I tried this today but did not work
IFS( CONTAINS( [Task] , 'Inspection' ) ,
USEREMAIL()=[worker].[Email]
)
Solved! Go to Solution.
In your case, could it be just as simple as..
IN(
USEREMAIL(),
LIST([Driver].[Email],[Inspector].[Email],[Helper].[Email])
)
If you need it to be TRUE, should you then use word "Delivery" instead of "Inspection" with your formula?
Please share the table, slice, and expression screen shots.
for my understanding IF Enum List [Task] = "INSPECTION", then return workers email id. Is this Right?
I think
1. USERMAIL () returns current app user email id not some others email id.
2. As @AleksiAlkio said, the condition should be true.
Hi @aminsaleh
IFS(
CONTAINS([Task], "Delivery"),
[Driver].[Email] = USEREMAIL(),
CONTAINS([Task], "Inspection"),
[Inspector].[Email] = USEREMAIL(),
TRUE
)
Ifs(
(Table1[Task]= "Delivery", [Email] = (any(Driver[email]),
(Table1[Task]= "inspection", [Email] = (any(inspector[email]),
(Table1[Task]= "Delivery", [Email] = (any(helper[email])
)
Please share screen shots of tables And Data source .
In your case, could it be just as simple as..
IN(
USEREMAIL(),
LIST([Driver].[Email],[Inspector].[Email],[Helper].[Email])
)
Thanks all, your solution's solved it and I also have found this is also ok
Ifs(
CONTAINS( [Task] , "Delivery"),
IN(USEREMAIL(),Driver CA[Email]),
CONTAINS( [Task] , "Return"),
IN(USEREMAIL(),Return Driver[Email]),
)
Thanks indeed
User | Count |
---|---|
18 | |
11 | |
11 | |
8 | |
4 |