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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

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
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Users online (2,167)