Hi everyone,
I have this issue with finding a column in this formula:
I don’t know why the formula doesn’t recognize the ProyectID column, i think everything is referenced as it should be.
Solved! Go to Solution.
The users
slice probably doesn’t include the ProyectosID
column of the Usuarios
table.
Hi @Oldsoul
That’s strange indeed, your expression looks fine to me.
But I better go with the data table directly, instead of slices.
You may want to try that instead:
OR(
LOOKUP(USEREMAIL(),"Usuarios","UserID","ROL")= "Admin",
AND(
LOOKUP(USEREMAIL(),"Usuarios","UserID","ROL")= "Usuario",
LOOKUP(USEREMAIL(),"Usuarios","UserID","ProyectoID")= [ProyectoID]
)
)
or
OR(
LOOKUP(USEREMAIL(),"Usuarios","UserID","ROL")= "Admin",
AND(
LOOKUP(USEREMAIL(),"Usuarios","UserID","ROL")= "Usuario",
IN(USEREMAIL(),[ProyectoID].[Related Usuarios])
)
)
or, equivalent (assuming [ROL] is Admin or Usuario only):
SWITCH(LOOKUP(USEREMAIL(),"Usuarios","UserID","ROL"),
"Usuario", LOOKUP(USEREMAIL(),"Usuarios","UserID","ProyectoID")= [ProyectoID],
true
)
or
SWITCH(LOOKUP(USEREMAIL(),"Usuarios","UserID","ROL"),
"Usuario", IN(USEREMAIL(),[ProyectoID].[Related Usuarios]),
true
)
The users
slice probably doesn’t include the ProyectosID
column of the Usuarios
table.
Thank you both @Steve and @Aurelien !
@Steve you’re right, it worked after i did this, ProyectosID
Column was not included in the slice. I added that column after creating the table Usuarios
and i tough the column will be added instantly as well.
@Aurelien This last formula worked just fine! thank you
SWITCH(LOOKUP(USEREMAIL(),"Usuarios","UserID","ROL"),
"Usuario", IN(USEREMAIL(),[ProyectoID].[Related Usuarios]),
true
)
Wish i could give you both the solution check.
User | Count |
---|---|
41 | |
25 | |
25 | |
17 | |
12 |