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
Anonymous
Not applicable

Two average lines on Line chart.

Hi All,

 

I have columns like projectID and actual contribution in my data.

 

I am taking projectID on X axis and actual contribution on Y axis. 

 

I need to add two average lines on a line chart such that first average line will indicate average of all actual contribution values of whole department where as second line will indicate average of actual contribution of perticular project manager within respective department.

 

    I want my first average line should be static if any person from same department logged in to power BI (by using RLS) and second line should vary according to the contribution status of each project for that respective project manager.

 

I am not able to find out how to keep actual contribution line static for everytime for same department.

 

Any help is appreciated.

Thanks in advance.

 

Shraddha

 

 

2 REPLIES 2
TomMartens
Super User
Super User

Hey,

 

Assuming there are 2 departments, with 5 projects each, each project has 1 dedicated projectmanager.

 

At the moment where you use RLS to restrict access for one projectmanager to his project, he will not be able to see values from his department.

 

For this reason, I would use this approach:

Use RLS to restrict access to projects on department level. This provide the data to calculate the average contribution to all projects on department level.

 

To calculate the average of dedicated projects of the current login (the project manager) I would assign the login as a column in the project table. This will allow to use the DAX function USERNAME() to filter down the accessible projects.

 

If you have to ensure that a projectmanager has only access to a dedicated project(s), you have to provide an aggregation table that stores the project values on departmentlevel w/o a relationship to the project table.

 

Hope this helps

 

Regards

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany
Anonymous
Not applicable

HI @TomMartens,

 

Thanks for your reply.

 

Approch which you have mensioned is perfect but in my case if I am applying RLS to restrict access to projects on department level then my other visuals gets affected, as I am developing a dashboard from project manager's point of view.

 

What I want to achieve from this line chart is project manager should be able to comapre his projects' status with departmental project status. 

 

Regards,

Shraddha.

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.