Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
trushna
Frequent Visitor

Filtering dashboards

I have a requirement to create different dashboards for different User roles, and which will be displayed to that user role only

Eg. : If Manager will log in into CRM then associated dashboard will be shown to him and if Sales person will log in then his dashboard will be shown.

 

Please help me how can I achieve this?

@Patrik 

1 ACCEPTED SOLUTION

Hi @trushna,

Did you mind adding an additional field to the user table?

If that is the case, I'd like to suggest you add the is_Manage field for the advanced filter effect. Then you can modify the filter expressions to check the user id and is_Manage field.
If the current user is a manager, then you can filter on the other field(e.g. department, group) instead of the 'user id' field to show all records he has permission to view.

Logic:

1. Use 'username' function to get 'user id' and correspond 'is manage' field values.
2. If the current user is a manager, filter on the parent field(group/department) that he manages; If he isn't a manager, filter on the 'user id' field.
Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

3 REPLIES 3
v-shex-msft
Community Support
Community Support

HI @trushna,

You can take a look at the following link to use the USERNAME function to achieve dynamic RLS roles:

Solved: RLS with UserName() - Microsoft Power BI Community

For the manager/user level filter, you can create a 'user_manger' mapping table with 'user id' and 'manger id'.
Then you can modify the RLS filter expression to lookup correspond 'user id' from the user table and filter 'user_manger' table 'manger id' and 'user id' fields with 'OR' logic and apply filter effects to other tables based on relationships.

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Thanks @v-shex-msft,

 

But in my case I dont want to use "Manage role" feature of power bi.

Is there any alternative to do this?

Hi @trushna,

Did you mind adding an additional field to the user table?

If that is the case, I'd like to suggest you add the is_Manage field for the advanced filter effect. Then you can modify the filter expressions to check the user id and is_Manage field.
If the current user is a manager, then you can filter on the other field(e.g. department, group) instead of the 'user id' field to show all records he has permission to view.

Logic:

1. Use 'username' function to get 'user id' and correspond 'is manage' field values.
2. If the current user is a manager, filter on the parent field(group/department) that he manages; If he isn't a manager, filter on the 'user id' field.
Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.