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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Doylezeebeast
Frequent Visitor

Dax code for row level security to handle path function where a parent can report to a parent

Hi there,

              I have been making use of the "PATH" function in power BI to build some row level security. This is for a data set where this lists all of the supervisory organizations in a business, along with its reference ID, who the mananger is, their email address and then the reference ID number of the "superior" supervisory organization. However in some cases there can be a sceniro where by a manager can inherit the supervisory organization below them due to the supervisory organization not having a “real” manager in post. In these cases the dax for the row level security appears to break and then no visuals are displayed on the screen.

When I look at the “PATH” function in my table this works correctly and builds all the way to the top of the hierarchy. So I think it must be something to do with the Dax used for the RLS? For reference here is the code being used:

 

PATHCONTAINS(

    Data[Path],

    Maxx(

        FILTER(

            Data,

            [Email] = USERPRINCIPALNAME()

        ),

        Data[Supervisory Org reference ID]

    )

)

 

Any help would be greatly received! Thank you

3 REPLIES 3
Doylezeebeast
Frequent Visitor

Is anyone able to help with this please?

parry2k
Super User
Super User

@Doylezeebeast can you share the sample pbix file with the expected output and will get back to you with a solution. 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

@parry2k Thanks for your input on this below are the links to the PBIX and excel file. I have put some comments in the PBIX about the excepted output. Thank you.

File

https://docs.google.com/spreadsheets/d/1llzKd19RqessSVGvpFFiacO2T4To3dDR/edit?usp=sharing&ouid=10425...

 

PBIX

https://drive.google.com/file/d/1KGolMGo50e01LJy3cCUa6_TfabjGUCZ0/view?usp=sharing

Helpful resources

Announcements
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 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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