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
jhaastBI
Helper I
Helper I

Dynamic axis based on user

Hi people,

 

I want to create a visualisation of which axis change based on the logged-in user.

In my organisation, there are managers and team leads with the following hierarchy.

 

jhaastBI_0-1622445712201.png

 

 

I want to show the same visualisation, with for example the sales vs budget.

In this visualisation should the manager see the department results and the team leads should see the results per team, like the visual below.

 

jhaastBI_1-1622445902620.png

 

 

Does somebody know how I could create this graph / model?

1 ACCEPTED SOLUTION
tex628
Community Champion
Community Champion

I believe that you need a table like this:

ID Category Category 2 E-Mail
Project - Team 1 Project Team 1 DepartmentManager1@company.com
Project - Team 2 Project Team 2 DepartmentManager1@company.com
Project - Team 3 Project Team 3 DepartmentManager1@company.com
Maintainance - Team 1 Maintainance Team 1 DepartmentManager2@company.com
Maintainance - Team 2 Maintainance Team 2 DepartmentManager2@company.com
Maintainance - Team 3 Maintainance Team 3 DepartmentManager2@company.com
Project - Team 1 Team 1   TeamLead1@company.com
Maintainance - Team 1 Team 1   TeamLead1@company.com
Project - Team 2 Team 2   TeamLead2@company.com
Maintainance - Team 2 Team 2   TeamLead2@company.com
Project - Team 3 Team 3   TeamLead3@company.com
Maintainance - Team 3 Team 3   TeamLead3@company.com


You then connect it to a mapping table, with only distict ID's:

ID
Project - Team 1
Project - Team 2
Project - Team 3
Maintainance - Team 1
Maintainance - Team 2
Maintainance - Team 3


And then you connect the mapping table to your sales table. 

Crossfilter direction "Both" on the relationships. And finally you apply RLS on the E-mail column of the first table. 

This should mean that if you use the "Category" column you will only see departments as a DM, and only Teams as a TL. 

What do you think? 

Br,
J


Connect on LinkedIn

View solution in original post

6 REPLIES 6
tex628
Community Champion
Community Champion

Hi, 

You should be able to accomplish this by applying RLS to your model. 

How does the relationships between "Data" - "Person" - "Team/Department" look at the moment?

/ J


Connect on LinkedIn

I've added the employee table to my last post.

This is the current model:

jhaastBI_0-1622450576020.png

Currently, no relationship is defined between the Teams and the Employee table.

I'm using RLS to define limit the shown data to the users. E.g.:
User 1: Department = "Project"  (because the user should also see the results of other teams in de department)

User 2: Department  = "Project"

User 3: Department = "Project"

 

To clarify, one visual should be used and not two.

tex628
Community Champion
Community Champion

RLS in this scenario will mean the following:

Department Managers will only see the departments they manage.
Team Leads will only see the teams they lead.
Team Members will only see the teams they are part of. 

Does this work for you business case? 

Br,
J


Connect on LinkedIn

Yes, kind of.

 

However, the manager's x-axis in the graph should show the department they manage.

The x-axis in the graph of the team leads, should show the teams of the department they are in (so not only their team).

The team member, don't have access to Power BI, so they are out of scope.

tex628
Community Champion
Community Champion

I believe that you need a table like this:

ID Category Category 2 E-Mail
Project - Team 1 Project Team 1 DepartmentManager1@company.com
Project - Team 2 Project Team 2 DepartmentManager1@company.com
Project - Team 3 Project Team 3 DepartmentManager1@company.com
Maintainance - Team 1 Maintainance Team 1 DepartmentManager2@company.com
Maintainance - Team 2 Maintainance Team 2 DepartmentManager2@company.com
Maintainance - Team 3 Maintainance Team 3 DepartmentManager2@company.com
Project - Team 1 Team 1   TeamLead1@company.com
Maintainance - Team 1 Team 1   TeamLead1@company.com
Project - Team 2 Team 2   TeamLead2@company.com
Maintainance - Team 2 Team 2   TeamLead2@company.com
Project - Team 3 Team 3   TeamLead3@company.com
Maintainance - Team 3 Team 3   TeamLead3@company.com


You then connect it to a mapping table, with only distict ID's:

ID
Project - Team 1
Project - Team 2
Project - Team 3
Maintainance - Team 1
Maintainance - Team 2
Maintainance - Team 3


And then you connect the mapping table to your sales table. 

Crossfilter direction "Both" on the relationships. And finally you apply RLS on the E-mail column of the first table. 

This should mean that if you use the "Category" column you will only see departments as a DM, and only Teams as a TL. 

What do you think? 

Br,
J


Connect on LinkedIn

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.