Forum Discussion
How to apply filter function on a column?
Hello All,
I am trying to create a report and i have a table of data which is having project name,pro id,emp name,id, location(off/onsite) like all are basic info about the each employee.
I am using RLS so that when ever a person can login to this report he can view their own personal data.
So, like that when i am opening this report with my username then i can able to see the project id's which are having under my list.
Now i am trying to show the basic emp details in a table like as emp name, id, role and location.
But in table i can see the only value of the person who login to the report.
I cant see the rest of employees which are belong to the same project id and their info in table.
I have tried a dax using calculated table funtion as below for only single pro id by using NEW TABLE option.
Table =
CALCULATETABLE(
SUMMARIZE('Basic Info','Basic Info'[Employee ID],'Basic Info'[Employee Role],'Basic Info'[Employee Name]),
FILTER('Basic Info','Basic Info'[Project ID]="C.0010978"
))
And it is giving the output for that perticular project.
But if i remove that hard coded pro id and put column of the pro id from table
Table =
CALCULATETABLE(
SUMMARIZE('Basic Info','Basic Info'[Employee ID],'Basic Info'[Employee Role],'Basic Info'[Employee Name]),
FILTER('Basic Info','Basic Info'[Project ID]='Basic Info'[Project ID]
))
then it is not filtering the values as the projects filtered from the slicer as show in above image.
It is showing all the emp names and their data.
How can i solve this.
Any suggestions.
thanks,
Mohan V
1 Reply
- v-huizhn-msftMicrosoft Employee
Hi Anonymous,
Based on my understanding, if you create a RLS based on login, every person can login to this report he can view their own personal data. And the person can't see other person's data, he/she still can't get other persons'(who have same Project_id with you) data. But you get it by creating new table, could you please share us how to your roles for further analysis?
In addition, please try the following formula and check if it works fine.Table = CALCULATETABLE( SUMMARIZE('Basic Info','Basic Info'[Employee ID],'Basic Info'[Employee Role],'Basic Info'[Employee Name]), FILTER('Basic Info','Basic Info'[Project ID]=SELECTEDVALUE('Basic Info'[Project ID]) ))
Best Regards,
Angelia