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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
ANILKORLIMARLA
Frequent Visitor

Want to create a hierarchy based Metrics with user RLS

 We have a hierarchy CEO - SVP - VP - DIR - MGR (Need Metrics visual to show the sales)

1. when DIR log in to th report he need to see his and his down level employee data 

DIR  

    Mgr

2. when SVP log in to th report he need to see his and his down level employee data 

 

SVP

   VP

       DIR

          MGR

 

we need ro use the mectrics visual to show the numbers, please help me with the data modelling, like how to frame the data  

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @ANILKORLIMARLA ,

Please try below steps:

1. below is the test table

Table:

vbinbinyumsft_0-1704694500706.png

 

Table(2):

vbinbinyumsft_1-1704694517897.png

 

Model:

vbinbinyumsft_2-1704694546394.png

 

2. add a new column in Table with below dax formula

Path = PATH('Table'[Name],'Table'[Manager])

 

vbinbinyumsft_3-1704694569025.png

3. create a new role with below dax formula

a =
PATHCONTAINS (
    'Table'[Path],
    CALCULATE (
        MAX ( 'Table'[Name]),filter(all('Table'),[Email] = USERPRINCIPALNAME () )
    )
)

vbinbinyumsft_4-1704694647419.png

4. add a table visual with Table(2) fields

vbinbinyumsft_5-1704694705682.png

Animation48.gif

Please refer the attached .pbix file.

 

Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @ANILKORLIMARLA ,

Please try below steps:

1. below is the test table

Table:

vbinbinyumsft_0-1704694500706.png

 

Table(2):

vbinbinyumsft_1-1704694517897.png

 

Model:

vbinbinyumsft_2-1704694546394.png

 

2. add a new column in Table with below dax formula

Path = PATH('Table'[Name],'Table'[Manager])

 

vbinbinyumsft_3-1704694569025.png

3. create a new role with below dax formula

a =
PATHCONTAINS (
    'Table'[Path],
    CALCULATE (
        MAX ( 'Table'[Name]),filter(all('Table'),[Email] = USERPRINCIPALNAME () )
    )
)

vbinbinyumsft_4-1704694647419.png

4. add a table visual with Table(2) fields

vbinbinyumsft_5-1704694705682.png

Animation48.gif

Please refer the attached .pbix file.

 

Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Ritaf1983
Super User
Super User

Hi @ANILKORLIMARLA 
Please refer to the linked tutorials:
https://www.youtube.com/watch?v=Z0eeTTL7EhQ

https://www.youtube.com/watch?v=V7XWLqdvzYM

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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