Dears, good week.
I am wanting to apply a filter to a slice that allows me to hide information from users based on their USEREMAIL().
I have two main tables:
1- Projects
2- Tasks
in turn I have child tables like:
3- Allocation of participation to projects.
4- Team Table
What I want to achieve is that when entering the application the user can only see the projects in which he participates, in turn that in the tasks section he can see all the tasks related to the project in which he is participating, these tasks are assigned to he or they are not, as long as he is part of this project that has these associated tasks.
2- Tasks table
3- Allocation of participation to projects.
4- Team Table
I have not been able to find a way to perform this filter…I have tried with the following expression:
AND(IF(SELECT(Tasks[Tarea],IN([project],SELECT(Project Team Assignment[Project ID],AND(ISNOTBLANK([Personnel]),([Personnel] = [_THISROW].[Assigned To]) ))))
Clearly, it notifies me of an error in relation to that it does not respond to a yes/no condition, which i understand but i don’t know how to include it and if it would not work either… i’m lost.
I think your projects slice filter expression for an individual’s projects in project table could be something like
IN(USERMAIL(), [Related Project Team Assignments][Personnel])
1 Like
i have tried that expression and it leave me everything blank, no projects related to users appear
That is because I believe the key of Team table is not email. Typically email is unique and can be a key for user or team tables.
Anyway, please create a slice called say “MyUserInfo” on Team table with an expression
[Email]=USEREMAIL()
Then your filter expression can be
IN(ANY(MyUserInfo[Colaborador ID]), [Related Project Team Assignments][Personnel])
Edit: Minor change to expression.
1 Like
aah ok, I understand the email as cloum id!
I’ve tried that expression along with the slice for the team table:
IN(ANY(MyUserInfo[Colaborador ID]), [Related Project Team Assignments][Personnel])
It doesn’t work either 
Maybe I’ll have to try redoing the configuration of the tables with email as identifier
Please do not disturb your set up. Please check step by step.
Does slice “MyUserInfo” expression show Y for only your record?
1 Like
I’m sorry, I have already modified the team table… the references are now to the email
I tried with the first expression and it doesn’t make any changes to me either… it doesn’t show me anything
IN(USEREMAIL(), [Asignaciones de equipos de proyectos relacionados][Personal])
Does [Personal] ref column in Allocation Table refer to Team table?
1 Like
Please try slice expression in Projects table as below
IN(USEREMAIL(), SPLIT( [Asignaciones de equipos de proyectos relacionados][Personal]),“,”)
with email column as key column in Team table.
1 Like
yes, the personal column refers to the team table.
I’ve tried that expression and it doesn’t work either.
Can you please insert the expression
SPLIT( [Asignaciones de equipos de proyectos relacionados][Personal]),“,”)
in a VC in Projects table and see in test what results it gives? Also what type of column it creates?
Alternatively, please try
[Asignaciones de equipos de proyectos relacionados][Personal]
in a VC and check what is it returning.
1 Like
For those first two errors, you have to simply set the VC as Y/N type. I am sorry that I may not be able to suggest more as I will have no access to laptop for next few days.
Also my request will be to take suggestions as hints and try something more around them if possible. For example, the two errors could be simply done away by converting those columns to Y/N types. Also after that you could take a look at Test pane of those two columns to see what results are getting shown. In general, community could suggest approach. Will request you to build further on those hints whenever possible.
Also since the expression is testing against USEREMAIL() , there need to be tasks allocated to the person testing the app, because if you are testing, your email will be checked with the USEREMAIL() in the slice expression. So please ensure you have created some tasks in the name of person who is testing the app. for those tasks to reflect in the slice filter.
I believe, based on details shared, the following expression will in general work as slice filter expression.
IN(USEREMAIL(), [Asignaciones de equipos de proyectos relacionados][Personal] )
1 Like